From 686cd79bdd9f18a7c88ad09719f120315456f01f Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 18 Oct 2013 17:52:31 -0700 Subject: [PATCH] Propagate EvaluationContext from LiteralExpression Update getValue(EvaluationContext context, Object rootObject, Class desiredResultType) to propagate the EvaluationContext to ExpressionUtils. Issue: SPR-10953 --- .../springframework/expression/common/LiteralExpression.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java b/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java index c9b1878ff3..aec7afde1e 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java @@ -27,7 +27,7 @@ import org.springframework.expression.TypedValue; * 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 * EL implementation like Spel, and some being just textual elements. - * + * * @author Andy Clement * @since 3.0 */ @@ -118,7 +118,7 @@ public class LiteralExpression implements Expression { @Override public T getValue(EvaluationContext context, Object rootObject, Class desiredResultType) throws EvaluationException { Object value = getValue(context, rootObject); - return ExpressionUtils.convertTypedValue(null, new TypedValue(value), desiredResultType); + return ExpressionUtils.convertTypedValue(context, new TypedValue(value), desiredResultType); } @Override