diff --git a/li.strolch.agent/src/main/java/li/strolch/runtime/query/inmemory/InMemoryQuery.java b/li.strolch.agent/src/main/java/li/strolch/runtime/query/inmemory/InMemoryQuery.java index 85a7c4bee..3348bd0d1 100644 --- a/li.strolch.agent/src/main/java/li/strolch/runtime/query/inmemory/InMemoryQuery.java +++ b/li.strolch.agent/src/main/java/li/strolch/runtime/query/inmemory/InMemoryQuery.java @@ -82,8 +82,11 @@ public class InMemoryQuery { U returnValue = element.accept(this.elementVisitor); DBC.INTERIM.assertNotNull("Visitor may not return null in query!", returnValue); //$NON-NLS-1$ - if (returnValue instanceof StrolchRootElement) - returnValue = (U) ((StrolchRootElement) returnValue).getClone(true); + if (returnValue instanceof StrolchRootElement) { + @SuppressWarnings("unchecked") + U ret = (U) ((StrolchRootElement) returnValue).getClone(true); + returnValue = ret; + } return returnValue; }).collect(Collectors.toList()); } diff --git a/li.strolch.soql/src/main/java/li/strolch/soql/core/expresssion/MethodExpression.java b/li.strolch.soql/src/main/java/li/strolch/soql/core/expresssion/MethodExpression.java index 6f39767d8..b14bb5e94 100644 --- a/li.strolch.soql/src/main/java/li/strolch/soql/core/expresssion/MethodExpression.java +++ b/li.strolch.soql/src/main/java/li/strolch/soql/core/expresssion/MethodExpression.java @@ -42,7 +42,7 @@ public class MethodExpression extends AbstractObjectExpression { // now find the method to call Method method; try { - method = object.getClass().getMethod(methodName, clazzes.toArray(new Class[0])); + method = object.getClass().getMethod(methodName, clazzes.toArray(new Class[0])); } catch (NoSuchMethodException e) { throw new SOQLEvaluationException( "Method " + methodName + " with arguments " + clazzes + " not declared on object " + object