ConstructorArgumentValues returns collections with different order [SPR-5554] #10225
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
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
The text was updated successfully, but these errors were encountered: