Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.1
-
None
Description
When I want to process multiple input files with a script.
> groovy -n -e "println line" file1 file2
I got no result for file2.
The cause is here:
groovy-2.5.1/src/main/groovy/groovy/ui/GroovyMain.java
513: try(BufferedReader reader = new BufferedReader(new FileReader(file)); 514: PrintWriter writer = new PrintWriter(System.out)) { 515: 516: processReader(s, reader, writer); 517: }
The System.out is closed by try-with-resources after file1 processing is completed.