Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1021

Can't do multi-line input with groovysh since JSR-02

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-2, 1.0-JSR-3
    • 1.0-JSR-5
    • None
    • None
    • Linux or Windows XP, JDK 1.4.2 or JDK 1.5.0

    Description

      previously in groovysh, you could enter a multi-line code block as shown below:

      us = ["Me","Myself","I"];
      us.each {
      println it;
      };
      go

      Since JSR-02 (possible JSR-01 as well) this will fail after the opening '{' on the 2nd line with the following error:

      groovy> us.each {
      Discarding invalid text:
      groovysh script: 2: unexpected token: null @ line 2, column 1.
      1 Error

      This definitely worked in Beta-10 and before.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kslater Kevin Slater
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: