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

Closed
spring-issuemaster opened this issue Aug 30, 2018 · 1 comment
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster 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:

org.springframework.expression.spel.ast.Operator.equalityCheck(Operator.java:222)

spel.Ex2141.getValue(Unknown Source)

org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:209)

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

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster 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
Projects
None yet
2 participants
You can’t perform that action at this time.