[Minor] Code cleanup and replace deprecated calls

This commit is contained in:
Robert von Burg 2020-08-19 14:25:09 +02:00
parent 91d4817dce
commit 6e910854e2
2 changed files with 6 additions and 3 deletions

View File

@ -82,8 +82,11 @@ public class InMemoryQuery<T extends StrolchRootElement, U> {
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());
}

View File

@ -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