Velocity
  1. Velocity
  2. VELOCITY-684

Passing a map literal to a macro call forbids altering the map in any way, while maps bound to an actual parameter may be changed

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.6.1
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      For example, with the following macro:

      #macro(changeMap $map)
      Before: $map.someKey
      #set($map.someKey = 'new value')
      After: $map.someKey
      #end

      This call works as expected:

      #set($actualMap =

      {'someKey' : 'old value'}

      )
      #changeMap($actualMap) => old value, then new value

      But this one doesn't:

      #changeMap(

      {'someKey' : 'old value'}

      ) => old value, then again old value

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Sergiu Dumitriu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development