Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow Collection Selection/Projection to be applied to instances of Iterable [SPR-13231] #17822
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
Juergen Hoeller commented
Let's reduce this to