[Minor] Code cleanup and replace deprecated calls
This commit is contained in:
parent
91d4817dce
commit
6e910854e2
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue