Skip to content

Commit 5d8aa63

Browse files
author
Phillip Webb
committed
Propagate EvaluationContext from LiteralExpression
Update getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) to propagate the EvaluationContext to ExpressionUtils. Issue: SPR-10953 (cherry picked from 686cd79)
1 parent ad9049e commit 5d8aa63

File tree

4 files changed

+2
-2
lines changed

4 files changed

+2
-2
lines changed

spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -102,7 +102,7 @@ public String getValue(EvaluationContext context, Object rootObject) throws Eval
102102

103103
public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) throws EvaluationException {
104104
Object value = getValue(context, rootObject);
105-
return ExpressionUtils.convert(null, value, desiredResultType);
105+
return ExpressionUtils.convert(context, value, desiredResultType);
106106
}
107107

108108
public Class getValueType(Object rootObject) throws EvaluationException {
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)