You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Sergiu Dumitriu (JIRA)" <ji...@apache.org> on 2015/12/04 22:44:11 UTC

[jira] [Closed] (VELOCITY-871) #foreach should work over any Iterable class

     [ https://issues.apache.org/jira/browse/VELOCITY-871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergiu Dumitriu closed VELOCITY-871.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.x
                   2.x

> #foreach should work over any Iterable class
> --------------------------------------------
>
>                 Key: VELOCITY-871
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-871
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Sergiu Dumitriu
>            Assignee: Sergiu Dumitriu
>             Fix For: 2.x, 1.7.1, 1.x
>
>
> The current code was written before Java 1.5 added the {{Iterable}} class, so it tries to partially add support for it by invoking the {{iterator}} method through reflection, but this doesn't work for inaccessible classes (see VELOCITY-870). Since 1.7 requires Java 1.5, we can check if the target object implements {{Iterable}} directly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org