Propagate EvaluationContext from LiteralExpression
Update getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) to propagate the EvaluationContext to ExpressionUtils. Issue: SPR-10953
This commit is contained in:
parent
c9aace4da2
commit
686cd79bdd
|
@ -27,7 +27,7 @@ import org.springframework.expression.TypedValue;
|
||||||
* string literal. It is used with CompositeStringExpression when representing a template
|
* string literal. It is used with CompositeStringExpression when representing a template
|
||||||
* expression which is made up of pieces - some being real expressions to be handled by an
|
* expression which is made up of pieces - some being real expressions to be handled by an
|
||||||
* EL implementation like Spel, and some being just textual elements.
|
* EL implementation like Spel, and some being just textual elements.
|
||||||
*
|
*
|
||||||
* @author Andy Clement
|
* @author Andy Clement
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
|
@ -118,7 +118,7 @@ public class LiteralExpression implements Expression {
|
||||||
@Override
|
@Override
|
||||||
public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) throws EvaluationException {
|
public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) throws EvaluationException {
|
||||||
Object value = getValue(context, rootObject);
|
Object value = getValue(context, rootObject);
|
||||||
return ExpressionUtils.convertTypedValue(null, new TypedValue(value), desiredResultType);
|
return ExpressionUtils.convertTypedValue(context, new TypedValue(value), desiredResultType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue