Fix double SPeL evaluation of parameter
When a node of an SPeL expression was a call to a bean referenced
in a method argument, the expression was resolved twice.
The resolved arguments are now specified to MethodValueRef instead
of resolving the arguments again in the constructor
Issue: SPR-11445
(cherry picked from commit 519799e)
This commit is contained in:
committed by
Juergen Hoeller
parent
f1ba789494
commit
b1bcc5d6eb
@@ -68,7 +68,7 @@ public class MethodReference extends SpelNodeImpl {
|
||||
throwIfNotNullSafe(getArgumentTypes(arguments));
|
||||
return ValueRef.NullValueRef.instance;
|
||||
}
|
||||
return new MethodValueRef(state);
|
||||
return new MethodValueRef(state, arguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -246,11 +246,11 @@ public class MethodReference extends SpelNodeImpl {
|
||||
|
||||
private final Object[] arguments;
|
||||
|
||||
public MethodValueRef(ExpressionState state) {
|
||||
public MethodValueRef(ExpressionState state, Object[] arguments) {
|
||||
this.evaluationContext = state.getEvaluationContext();
|
||||
this.value = state.getActiveContextObject().getValue();
|
||||
this.targetType = state.getActiveContextObject().getTypeDescriptor();
|
||||
this.arguments = getArguments(state);
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user