You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Skiles (Jira)" <ji...@apache.org> on 2020/02/15 03:22:00 UTC

[jira] [Created] (GROOVY-9400) Regression in end of line handling between 2.5.9 and 3.0.0

Daniel Skiles created GROOVY-9400:
-------------------------------------

             Summary: Regression in end of line handling between 2.5.9 and 3.0.0
                 Key: GROOVY-9400
                 URL: https://issues.apache.org/jira/browse/GROOVY-9400
             Project: Groovy
          Issue Type: Bug
          Components: Compiler
    Affects Versions: 3.0.0
         Environment: 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)
            Reporter: Daniel Skiles


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

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

In 2.5.9, you receive the following ouptut:

 
{code:java}
hello world 1
hello world 2{code}
In 3.0.0, you receive the following output:

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

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)