提交 686cd79b 编写于 作者: P Phillip Webb

Propagate EvaluationContext from LiteralExpression

Update getValue(EvaluationContext context, Object rootObject,
Class<T> desiredResultType) to propagate the EvaluationContext to
ExpressionUtils.

Issue: SPR-10953
上级 c9aace4d
......@@ -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> T getValue(EvaluationContext context, Object rootObject, Class<T> 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册