Disable variable assignment in SimpleEvaluationContext
This commit introduces infrastructure to differentiate between
programmatic setting of a variable in an EvaluationContext versus the
assignment of a variable within a SpEL expression using the assignment
operator (=). In addition, this commit disables variable assignment
within expressions when using the SimpleEvaluationContext.
Closes gh-30328
@ -147,8 +149,12 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@@ -147,8 +149,12 @@ public class PropertyOrFieldReference extends SpelNodeImpl {
@ -200,6 +202,17 @@ public final class SimpleEvaluationContext implements EvaluationContext {
@@ -200,6 +202,17 @@ public final class SimpleEvaluationContext implements EvaluationContext {
@ -367,9 +370,26 @@ public class EvaluationTests extends AbstractExpressionTests {
@@ -367,9 +370,26 @@ public class EvaluationTests extends AbstractExpressionTests {