Groovy
  1. Groovy
  2. GROOVY-901

SimpleTemplateEngine error :"Caught: Script1.groovy: 1: expecting anything but ''\n''; got it anyway @ line"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-JSR-2
    • Fix Version/s: 1.0-JSR-3
    • Component/s: groovy-jdk
    • Labels:
      None
    • Environment:
      jdk 1.5.0_02, Windows XP Sp2,Groovy 1.0-JSR-2

      Description

      Simple program, but the result surprised me.
      The template should WYSIWYG, but in this version of SimpleTemplateEngine of Groovy, all text must be written in one row and must use "\n" instead of an enter press.
      I think this should be a bug.

      attachment is the simple program and template file it uses.

      1. template.txt
        0.1 kB
        Alan L Zhang
      2. templateEngine.groovy
        0.3 kB
        Alan L Zhang

        Issue Links

          Activity

          Alan L Zhang created issue -
          sormuras made changes -
          Field Original Value New Value
          Link This issue depends upon GROOVY-818 [ GROOVY-818 ]
          Hide
          sormuras added a comment -

          Already stumbled across it - couldn't reproduce it that time. Looking into it now.
          The TemplateServlet uses a work-around at the moment, eliminating all '\n' before compiling.

          Show
          sormuras added a comment - Already stumbled across it - couldn't reproduce it that time. Looking into it now. The TemplateServlet uses a work-around at the moment, eliminating all '\n' before compiling.
          sormuras made changes -
          Assignee Christian Stein [ sormuras ]
          Hide
          sormuras added a comment -

          SimpleTemplateEngine correctly handles new line characters now.

          Show
          sormuras added a comment - SimpleTemplateEngine correctly handles new line characters now.
          sormuras made changes -
          Fix Version/s 1.0-JSR-3 [ 11518 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
          Mark Thomas made changes -
          Workflow jira [ 12730050 ] Default workflow, editable Closed status [ 12741960 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
          Mark Thomas made changes -
          Workflow jira [ 12968469 ] Default workflow, editable Closed status [ 12976229 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          18h 6m 1 sormuras 20/Jun/05 04:13

            People

            • Assignee:
              sormuras
              Reporter:
              Alan L Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development