Skip to content

SpEL Projection Regression [SPR-11348] #15972

@spring-projects-issues

Description

@spring-projects-issues

Gary Russell opened SPR-11348 and commented

Projection Expression:

new java.util.ArrayList(#root).![payload].toString()

where the root object is an UnmodifiableCollection of messages whose payloads are Integers....

[[Payload Integer content=0][Headers={correlationId=1, sequenceSize=5, sequenceNumber=0, id=f701482f-9d91-7c4e-9f69-c07baa37938e, timestamp=1390425289802}], [Payload Integer content=1][Headers={correlationId=1, sequenceSize=5, sequenceNumber=1, id=13ffdd8f-5d02-d336-e213-3d4aa89c84c8, timestamp=1390425289806}], [Payload Integer content=2][Headers={correlationId=1, sequenceSize=5, sequenceNumber=2, id=2b278fe4-0155-8758-5f84-2a5df91146cc, timestamp=1390425289806}], [Payload Integer content=3][Headers={correlationId=1, sequenceSize=5, sequenceNumber=3, id=56fba1c0-5fd4-8955-9924-0c1a9a239251, timestamp=1390425289807}], [Payload Integer content=4][Headers={correlationId=1, sequenceSize=5, sequenceNumber=4, id=13632546-5842-e1f8-845c-ef95d28c78ef, timestamp=1390425289807}]]

In 4.0.0 SpEL correctly resolves to the public java.util.ArrayList(java.util.Collection) ctor.

With the 4.0.1 snapshot, it resolves to the ArrayList(int) ctor.

resulting in

No converter found capable of converting from type java.util.Collections$UnmodifiableCollection<?> to type int


Affects: 4.0.1

Referenced from: commits 86fc2dd

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