Velocity
  1. Velocity
  2. VELOCITY-379

foreach should generalise for Iterable, not just Collection

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Henning Schmiedehausen
            Reporter:
            David Blaikie
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development