[ http://issues.apache.org/jira/browse/VELOCITY-379?page=all ]

Henning Schmiedehausen resolved VELOCITY-379.
---------------------------------------------

    Fix Version/s: 1.5
                       (was: 2.0)
       Resolution: Fixed
         Assignee: Henning Schmiedehausen

For Velocity 1.5 you can use a custome Uberspector to be able to iterate on 
Iterable. There is example code on how to do this in whiteboard/henning/jdk15 
and an actual implementation in 
whiteboard/henning/jdk15/src/java/org/apache/velocity/util/introspection/JDK15UberspectImpl.java

> foreach should generalise for Iterable, not just Collection
> -----------------------------------------------------------
>
>                 Key: VELOCITY-379
>                 URL: http://issues.apache.org/jira/browse/VELOCITY-379
>             Project: Velocity
>          Issue Type: Bug
>          Components: Source
>    Affects Versions: 1.5
>         Environment: Operating System: All
> Platform: All
>            Reporter: David Blaikie
>         Assigned To: Henning Schmiedehausen
>             Fix For: 1.5
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to