Velocity
  1. Velocity
  2. VELOCITY-667

Regression: Specifying #macro without parenthesis no longer throws VelocityException

    Details

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

      Description

      With version 1.5, VelocityEngine.mergeTemplate() would throw VelocityException if I specified a grammar error in the template. This is what I was using my unit test to show that parsing would fail:

      #macro #macro

      Now in 1.6.1, it renders an empty string. Method:
      velocityEngine.mergeTemplate(templateLocation, velocityContext, writer);

        Activity

        Paul Benedict created issue -
        pbenedict made changes -
        Field Original Value New Value
        Description With version 1.5, VelocityEngine.mergeTemplate() would throw VelocityException if I specified a bad template name. Now in 1.6.1, it renders an empty string.

        velocityEngine.mergeTemplate(templateLocation, velocityContext, writer);
        With version 1.5, VelocityEngine.mergeTemplate() would throw VelocityException if I specified a grammar error in the template. This is what I was using my unit test to show that parsing would fail:

        #macro #macro

        Now in 1.6.1, it renders an empty string. Method:
        velocityEngine.mergeTemplate(templateLocation, velocityContext, writer);
        Summary Regression: Specifying bad template name to VelocityEngine.mergeTemplate no longer throws Exception Regression: Specifying bad grammar no longer throws VelocityException
        Byron Foster made changes -
        Comment [ I am able to reproduce the problem, I'm hunting it down now. ]
        pbenedict made changes -
        Summary Regression: Specifying bad grammar no longer throws VelocityException Regression: Specifying #macro without parenthesis no longer throws VelocityException
        Byron Foster made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        pbenedict made changes -
        Fix Version/s 1.6.2 [ 12313574 ]
        Component/s Engine [ 12311337 ]
        Mark Thomas made changes -
        Workflow jira [ 12450528 ] Default workflow, editable Closed status [ 12551661 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12551661 ] jira [ 12552537 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development