Velocity
  1. Velocity
  2. VELOCITY-755

Maps should be stored in the order they are defined

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.7, 2.x
    • Component/s: Engine
    • Labels:
      None

      Description

      If you create a map with Velocity like: #set( $monkey.Map =

      {"banana" : "good", "roast beef" : "bad"}

      ) the elements are not stored in the order they are defined. So I think a HashMap implemention is used for the map creation. It would be great if you switch over to a LinkedHashMap implementation, because you get a lot of benefits if you are heavy maps in your templates and the order is important.

        Activity

        Canny created issue -
        Nathan Bubna made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.7 [ 12313453 ]
        Fix Version/s 2.0 [ 12310291 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12500379 ] Default workflow, editable Closed status [ 12551719 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551719 ] jira [ 12552260 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Canny
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development