Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-13231

Allow Collection Selection/Projection to be applied to instances of Iterable

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 4.2 RC3
    • Component/s: Core:SpEL
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            agib Andrew Whitehead
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 19 weeks, 4 days ago