Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-379

foreach should generalise for Iterable, not just Collection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.5
    • Engine
    • None
    • Operating System: All
      Platform: All
    • 34921

    Description

      As of Java 1.5 the java.lang.Iterable interface is the general contract that
      should be used when looking for things that provide Iterators. This allows for
      user defined non collection types to be generally usable by things that just
      need iteration such as the Java Language's for(X x : y) looping construct and
      seems perfectly applicable to the velocity Foreach directive.
      I'm not sure of the versioning policy (which java version) of Velocity so if you
      are deliberately not creating a 1.5 dependency then this is not a bug.

      Attachments

        Activity

          People

            henning Henning Schmiedehausen
            dblaikie@ug.cs.usyd.edu.au David Blaikie
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: