Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-625

Macro generates array bounds exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6
    • Component/s: Engine
    • Labels:
      None

      Description

      The following VTL:

      #macro(test $a $b)#end #test("x")

      Generates the following exception:

      Threw: java.lang.ArrayIndexOutOfBoundsException
      msg: 1
      thrown at: org.apache.velocity.runtime.parser.node.SimpleNode.jjtGetChild(SimpleNode.java:172)
      org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:156)
      org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:245)
      org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:178)
      org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:334)
      org.apache.velocity.Template.merge(Template.java:328)
      org.apache.velocity.Template.merge(Template.java:235)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              byronvf Byron Foster
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: