Polishing

This commit is contained in:
Juergen Hoeller
2017-09-27 01:46:16 +02:00
parent 9fdc4404a5
commit 5f167fd7f8
8 changed files with 31 additions and 27 deletions

View File

@@ -106,10 +106,12 @@ public class ReflectiveMethodExecutor implements MethodExecutor {
public TypedValue execute(EvaluationContext context, Object target, Object... arguments) throws AccessException {
try {
if (arguments != null) {
this.argumentConversionOccurred = ReflectionHelper.convertArguments(context.getTypeConverter(), arguments, this.method, this.varargsPosition);
}
if (this.method.isVarArgs()) {
arguments = ReflectionHelper.setupArgumentsForVarargsInvocation(this.method.getParameterTypes(), arguments);
this.argumentConversionOccurred = ReflectionHelper.convertArguments(
context.getTypeConverter(), arguments, this.method, this.varargsPosition);
if (this.method.isVarArgs()) {
arguments = ReflectionHelper.setupArgumentsForVarargsInvocation(
this.method.getParameterTypes(), arguments);
}
}
ReflectionUtils.makeAccessible(this.method);
Object value = this.method.invoke(target, arguments);