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

EOF exception when last line is commented out and has no new line at end

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5
    • Engine
    • None
    • Operating System: other
      Platform: Other
    • 29674

    Description

      So if this is the last line of a template:

        1. something....<EOF>

      Then we'll get an exception:

      org.apache.velocity.exception.ParseErrorException: Lexical error:
      org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 8,
      column 110. Encountered: <EOF> after : ""
      at org.apache.velocity.Template.process(Template.java:181)
      at
      org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:466)
      at
      org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
      at
      org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
      at org.apache.velocity.runtime.directive.Parse.render(Parse.java:196)
      at
      org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
      at
      org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            zluspai@freemail.hu Zoltan Luspai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment