Details
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.