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

Regression in end of line handling between 2.5.9 and 3.0.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 4.0.0-alpha-1, 3.0.2
    • parser-antlr4
    • Microsoft Windows 10 professional - 64 bit

      openjdk version "1.8.0_222"
      OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
      OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)

    Description

      If you execute the following code in 2.5.9, you will receive different output in 2.5.9 and 3.0.0.

       

      final GroovyShell shell = new GroovyShell()
      script = shell.parse("println('hello world 1')\rprintln('hello world 2')")
      script.run()

       

      In 2.5.9, you receive the following ouptut:

       

      hello world 1
      hello world 2

      In 3.0.0, you receive the following output:

       

      1 compilation error:
      Unexpected input: '\r'; Expecting <EOF> at line: 1, column: 25
      

       

       

       

      Attachments

        Activity

          People

            daniel_sun Daniel Sun
            dskiles Daniel Skiles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: