Skip to content

SpEL: support for inline list expressions [SPR-7335] #11994

@spring-projects-issues

Description

@spring-projects-issues

Andy Clement opened SPR-7335 and commented

This is a feature that is repeatedly requested in emails to me. I'm planning to reactivate (the previously written then removed) inline list support. At the moment users are having to make calls out to the Arrays type to build lists, eg.

T(java.util.Arrays).asList(1,2,3)

this will be very expensive (method invocation every time) compared to something like this

{1,2,3}

which, if expression evaluation is smart, will result in a single immutable constant list (of type ArrayList). Following on from that we can build the array construction syntax:

new int[]{1,2,3}

If you read this Juergen, are you ok with adding it?


Affects: 3.0.3

Referenced from: commits f5ced9b

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