Skip to content

ConstructorArgumentValues returns collections with different order [SPR-5554] #10225

@spring-projects-issues

Description

@spring-projects-issues

Costin Leau opened SPR-5554 and commented

ConstructorArgumentValues internally uses two collections - a map for indexed arguments and a linked list for unindexed ones. The problem is that the list returns the constructor arguments in the XML defined order while the map doesn't. This is inconsistent for the caller which has no way to discover the declaration order for the indexed arguments.
The fix is trivial - the HashMap needs to be changed to a LinkedHashMap to preserve the order (a change which is backwards compatible).


Affects: 2.5.6

Referenced from: commits 423c411

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