@ -70,6 +70,15 @@ public class CompositeStringExpression implements Expression {
@@ -70,6 +70,15 @@ public class CompositeStringExpression implements Expression {
@ -109,4 +118,57 @@ public class CompositeStringExpression implements Expression {
@@ -109,4 +118,57 @@ public class CompositeStringExpression implements Expression {
@ -57,9 +58,10 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@@ -57,9 +58,10 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
// Create a new collection or map ready for the indexer
@ -130,7 +132,6 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@@ -130,7 +132,6 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@ -151,6 +152,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@@ -151,6 +152,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
// Go through the accessors that may be able to resolve it. If they are a cacheable accessor then
// get the accessor and use it. If they are not cacheable but report they can read the property
@ -159,6 +161,9 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@@ -159,6 +161,9 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@ -224,7 +229,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@@ -224,7 +229,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@ -65,21 +65,29 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -65,21 +65,29 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@ -99,23 +107,25 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -99,23 +107,25 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
thrownewAccessException("Unable to access property '"+name+"' through getter",ex);
@ -123,19 +133,19 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -123,19 +133,19 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
thrownewAccessException("Unable to access field: "+name,ex);
@ -151,6 +161,12 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -151,6 +161,12 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@ -187,7 +203,9 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -187,7 +203,9 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@ -218,7 +236,7 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -218,7 +236,7 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
field=findField(name,type,targetinstanceofClass);
if(field!=null){
cachedMember=field;
this.readerCache.put(cacheKey,cachedMember);
this.writerCache.put(cacheKey,cachedMember);
}
}
if(field!=null){
@ -315,7 +333,23 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -315,7 +333,23 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@ -346,4 +380,148 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@@ -346,4 +380,148 @@ public class ReflectivePropertyResolver implements PropertyAccessor {
@ -47,15 +47,15 @@ public class StandardEvaluationContext implements EvaluationContext {
@@ -47,15 +47,15 @@ public class StandardEvaluationContext implements EvaluationContext {
@ -65,9 +65,7 @@ public class StandardEvaluationContext implements EvaluationContext {
@@ -65,9 +65,7 @@ public class StandardEvaluationContext implements EvaluationContext {
@ -77,7 +75,11 @@ public class StandardEvaluationContext implements EvaluationContext {
@@ -77,7 +75,11 @@ public class StandardEvaluationContext implements EvaluationContext {
@ -89,35 +91,65 @@ public class StandardEvaluationContext implements EvaluationContext {
@@ -89,35 +91,65 @@ public class StandardEvaluationContext implements EvaluationContext {
Assert.notNull(typeLocator,"TypeLocator must not be null");
this.typeLocator=typeLocator;
}
publicTypeLocatorgetTypeLocator(){
if(this.typeLocator==null){
this.typeLocator=newStandardTypeLocator();
}
returnthis.typeLocator;
}
@ -127,6 +159,9 @@ public class StandardEvaluationContext implements EvaluationContext {
@@ -127,6 +159,9 @@ public class StandardEvaluationContext implements EvaluationContext {
@ -117,8 +118,10 @@ public class ExpressionStateTests extends ExpressionTestCase {
@@ -117,8 +118,10 @@ public class ExpressionStateTests extends ExpressionTestCase {
@ -133,6 +136,13 @@ public class ExpressionStateTests extends ExpressionTestCase {
@@ -133,6 +136,13 @@ public class ExpressionStateTests extends ExpressionTestCase {
@ -168,6 +178,17 @@ public class ExpressionStateTests extends ExpressionTestCase {
@@ -168,6 +178,17 @@ public class ExpressionStateTests extends ExpressionTestCase {
Assert.assertEquals("i am a string",stateRoot.getValue());
}
@Test
publicvoidtestPopulatedNestedScopesMap(){
ExpressionStatestate=getState();
@ -257,5 +278,9 @@ public class ExpressionStateTests extends ExpressionTestCase {
@@ -257,5 +278,9 @@ public class ExpressionStateTests extends ExpressionTestCase {
@ -98,6 +99,10 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase {
@@ -98,6 +99,10 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase {
@ -106,13 +111,53 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase {
@@ -106,13 +111,53 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase {
@ -204,6 +249,16 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase {
@@ -204,6 +249,16 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase {