Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1839

Velocity macro parameter name can break passed parameter expression

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 12.0
    • 12.0-rc-1
    • Velocity
    • Unit
    • Unknown
    • N/A

    Description

      You can reproduce with something like this:

      #set($test = $someObjectWithAGetNameMethodReturning_value)
      #set($other = $someObjectWithAGetNameMethodReturning_something)
      
      #macro (testMacro $test $name)
        $name
      #end
      
      $test.name
      
      #testMacro($other, $test.name)
      

      It's a regression in Velocity 2.2 reported on https://issues.apache.org/jira/browse/VELOCITY-904?focusedCommentId=17019574&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17019574

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: