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

Spring expression: NPE in org.springframework.expression.spel.ast.Ternary [SPR-5441] #10115

Closed
spring-projects-issues opened this issue Jan 28, 2009 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Oliver Becker opened SPR-5441 and commented

The evaluation in getValue of Ternary is not null-safe.
Boolean b may evaluate to null, so if (b) will auto-unbox the contained boolean, which throws a NullPointerException in this case.

The code in line 45 should be
if (b != null && b.booleanValue()) {
...


Affects: 3.0 M1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants