Skip to content

VerifyError for compiled SpEL expression with primitive/reference type mix when using == [SPR-12557] #17159

@spring-projects-issues

Description

@spring-projects-issues

Andy Clement opened SPR-12557 and commented

When the operands to an == call are not numbers the method .equals() is used to compare them. If, in this situation, one of the operands is actually a primitive type then we need to box that primitive before calling equals. Currently this box operation is missing from the generated code, leading to a verify error. For example: ```
new String(35) == 35


Affects: 4.1.3

Referenced from: commits abc3cc4

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions