Skip to content

SpEL Compiler: problems using primitives with instanceof operator [SPR-14250] #18823

Closed
@spring-projects-issues

Description

@spring-projects-issues

Andy Clement opened SPR-14250 and commented

These two expressions generate bad code when compiled, for slightly different reasons:

3 instanceof T(Integer)
'foo' instanceof T(int)

The first because we didn't box the 3 in the OperatorInstanceOf.generateCode method. The second because primitive types used with instanceof need special handling. (Uncovered whilst testing some docs that Stephane referenced in another bug #18816)


Affects: 4.3 RC1

Issue Links:

Referenced from: commits a31f0bb

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions