index
variable not usable in collection selection/projection in SpEL
#23202
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
Affects: 5.0.4
When iterating on a collection, both Selection and Projection set a variable called
index
that contains the index of the current element.I would expect this variable to be usable in SpEL, e.g. for filtering one list based on elements of another list (or any other criterion that takes the index into account).
However, there doesn't seem to be any way to reference it.
The only code that makes use of
VariableScope
is never called.Am I missing something or is this feature not really complete?
The text was updated successfully, but these errors were encountered: