Allow Collection Selection/Projection to be applied to instances of Iterable [SPR-13231] #17822
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Andrew Whitehead opened SPR-13231 and commented
Currently Collection Selection/Projection only operates on Maps, Collections and Arrays.
It would be nice if it also supported instances of Iterator and Iterable so that the same functionality can be achieved without requiring user objects to implement the entire Collection interface, or wrapping them in a Collection.
The implementation of org.springframework.expression.spel.ast.Selection#getValueRef and org.springframework.expression.spel.ast.Projection#getValueRef only iterate over the collections anyway (after copying them into a List), so it doesn't seem like the extra functionality in Collection is required.
Referenced from: commits 0783a1c
The text was updated successfully, but these errors were encountered: