Skip to content

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

@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions