[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);
|
U returnValue = element.accept(this.elementVisitor);
|
||||||
DBC.INTERIM.assertNotNull("Visitor may not return null in query!", returnValue); //$NON-NLS-1$
|
DBC.INTERIM.assertNotNull("Visitor may not return null in query!", returnValue); //$NON-NLS-1$
|
||||||
|
|
||||||
if (returnValue instanceof StrolchRootElement)
|
if (returnValue instanceof StrolchRootElement) {
|
||||||
returnValue = (U) ((StrolchRootElement) returnValue).getClone(true);
|
@SuppressWarnings("unchecked")
|
||||||
|
U ret = (U) ((StrolchRootElement) returnValue).getClone(true);
|
||||||
|
returnValue = ret;
|
||||||
|
}
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class MethodExpression extends AbstractObjectExpression {
|
||||||
// now find the method to call
|
// now find the method to call
|
||||||
Method method;
|
Method method;
|
||||||
try {
|
try {
|
||||||
method = object.getClass().getMethod(methodName, clazzes.toArray(new Class[0]));
|
method = object.getClass().getMethod(methodName, clazzes.toArray(new Class<?>[0]));
|
||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
throw new SOQLEvaluationException(
|
throw new SOQLEvaluationException(
|
||||||
"Method " + methodName + " with arguments " + clazzes + " not declared on object " + object
|
"Method " + methodName + " with arguments " + clazzes + " not declared on object " + object
|
||||||
|
|
Loading…
Reference in New Issue