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

Velocity.evalute thows an exception if the next char after a keyword is '_'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      Win 7, Java 8
    • Flags:
      Patch, Important

      Description

      If I try to evalute the folling template "CONSTRAINT DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end__${column}" an exception is thrown.

      Velocity.evaluate(myContext, myStringWriter, "LOG", template); = >Exception occurred in target VM: Encountered "<EOF>" at LOG[line 1, column 93]
      Was expecting one of:
          "(" ...
          ")" ...
          <ESCAPE_DIRECTIVE> ...
          "]]#" ...
          <WHITESPACE> ...
          <NEWLINE> ...
          <SUFFIX> ...
          <STRING_LITERAL> ...
          <INTEGER_LITERAL> ...
          <FLOATING_POINT_LITERAL> ...
          <DOT> ...
          "

      {" ...     "}

      " ...
          "\\\\" ...
          "
      " ...
          <TEXT> ...
          <INLINE_TEXT> ...
          <EMPTY_INDEX> ...
          "{" ...
          <

      If I use the Template "CONSTRAINT DF_#if(${archiveTableTemplate})${archiveTableTemplate}#else${table}#end __${column}" it works, but the result is wrong. Blank after replacement.

        Attachments

          Activity

            People

            • Assignee:
              claude Claude Brisson
              Reporter:
              rgalt@web.de Alto
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: