Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EL1072 when evaluating compiled expression using method SpelExpression.getValue(Object rootObject, Class<T> expectedResultType) [SPR-17229] #21762

spring-projects-issues opened this issue Aug 30, 2018 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Aug 30, 2018

Juan Domínguez González opened SPR-17229 and commented

When using method SpelExpression.getValue(Object rootObject, Class<T> expectedResultType) for evaluating an expression involving a simple boolean comparison it fails when using the bytecode compiled expression.

The trace shows a NPE in Operator.equalityCheck, accesing the evaluation context for a typeComparator:


spel.Ex2141.getValue(Unknown Source)


The problem, apparently resides in method SpelExpression.getValue(Object, Class<T>). In line 209, it calls method getValue(Object, EvaluationContext) on its compiledAst but passes null instead of an evaluation context.

Affects: 4.3.16

Referenced from: commits 51cee65, e332e32, 1a626ab

Backported to: 4.3.19

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Aug 31, 2018

Juergen Hoeller commented

I've revised SpelExpression to consistently expose a default EvaluationContext to the compiled AST. Also, Operator includes explicit support for Boolean comparisons now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants