Velocity
  1. Velocity
  2. VELOCITY-359

#if(some expression)#end causes ParseException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter Romianowski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development