freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dekany (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FREEMARKER-53) Element order not preserved with java.util.Stack
Date Mon, 05 Jun 2017 09:57:04 GMT

    [ https://issues.apache.org/jira/browse/FREEMARKER-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036745#comment-16036745
] 

Daniel Dekany commented on FREEMARKER-53:
-----------------------------------------

Yes, things implementing {{Deque}}, like {{LinkedList}}, has a {{push}} method that insert
into the first position, so iteration order will be as expected. 

> Element order not preserved with java.util.Stack
> ------------------------------------------------
>
>                 Key: FREEMARKER-53
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-53
>             Project: Apache Freemarker
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 2.3.23
>            Reporter: Man J
>            Priority: Minor
>
> A field inside one of my model objects is of the type {{java.util.Stack}}. Java code
iterates over the elements of this field correctly to yield objects in last-in-first-out order.
However, Freemarker iterates over its elements in first-in-first-out order like a regular
{{List}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message