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

#if(some expression)#end causes ParseException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.5
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • Bugzilla Id:
      33669

      Description

      #if(...) #end works but #if(...)#end

      Stacktrace:

      org.apache.velocity.exception.ParseErrorException: Encountered "#en
      d\n" at line 61, column 44.
      Was expecting one of:
      "(" ...
      <RPAREN> ...
      <ESCAPE_DIRECTIVE> ...
      <SET_DIRECTIVE> ...
      "\\\\" ...
      "
      " ...
      <TEXT> ...
      <SINGLE_LINE_COMMENT> ...
      "*#" ...
      "*#" ...
      <STRING_LITERAL> ...
      "if" ...
      "stop" ...
      <NUMBER_LITERAL> ...
      <WORD> ...
      <DOT> ...
      "

      {" ... "}

      " ...
      <IDENTIFIER> ...

      If you wonder why we write such stupid statements: We use velocity inside a CMS
      where it is possible to leave texts blank inside an #if-block.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              antarapero@gmx.de Peter Romianowski
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: