Fix Compiled SpEL Test

Several problems:

- Setting the system property is not enough since the `static` parser already has its configuration
- Changing the ParametersWrapper to `private` makes property accessing not compilable (the method and class must be public).
- The expression...

    #target.messageAndHeader(message, headers['number'] != null ? headers['number'] : T(org.springframework.util.Assert).isTrue(false, 'required header not available: number'))

...is not compilable anyway because the right arguent to the `!=` is not compilable because the `TypeReference.exitTypeDescriptor` is `null`.

This commit addresses the first two.

Polishing

Use a compilable method.

* Simple polishing
This commit is contained in:
Gary Russell
2017-01-24 15:26:12 -05:00
committed by Artem Bilan
parent 3b82c698f3
commit eaaa21ef5d
2 changed files with 16 additions and 15 deletions

View File

@@ -785,10 +785,6 @@ public class MessagingMethodInvokerHelper<T> extends AbstractExpressionEvaluator
return (T) this.invocableHandlerMethod.invoke(message);
}
public Expression getExpression() {
return this.expression;
}
Class<?> getTargetParameterType() {
return this.targetParameterType;
}
@@ -979,7 +975,7 @@ public class MessagingMethodInvokerHelper<T> extends AbstractExpressionEvaluator
}
}
private static class ParametersWrapper {
public static class ParametersWrapper {
private final Object payload;