Details

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

      Description

      The following syntax (without #end) causes an NPE: "#@foo"

      class java.lang.NullPointerException
      apache.velocity.runtime.parser.node.SimpleNode.jjtGetChild(SimpleNode.java:183)
      org.apache.velocity.runtime.directive.BlockMacro.init(BlockMacro.java:107)
      org.apache.velocity.runtime.parser.node.ASTDirective.init(ASTDirective.java:138)
      org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.java:309)
      org.apache.velocity.Template.initDocument(Template.java:218)
      org.apache.velocity.Template.process(Template.java:126)

      1. velocity-675.patch
        3 kB
        Jarkko Viinamäki

        Issue Links

          Activity

          Byron Foster created issue -
          Byron Foster made changes -
          Field Original Value New Value
          Link This issue is related to VELOCITY-666 [ VELOCITY-666 ]
          Hide
          Jarkko Viinamäki added a comment -

          This should fix it. ASTDirective now checks if the node has a body. If it doesn't, it does not create a BlockMacro instance and renders as literal instead.

          Show
          Jarkko Viinamäki added a comment - This should fix it. ASTDirective now checks if the node has a body. If it doesn't, it does not create a BlockMacro instance and renders as literal instead.
          Jarkko Viinamäki made changes -
          Attachment velocity-675.patch [ 12398470 ]
          Nathan Bubna made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.7 [ 12313453 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Workflow jira [ 12450789 ] Default workflow, editable Closed status [ 12551611 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12551611 ] jira [ 12552495 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development