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

Groovy script output for 2nd and subsequent intput files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.1
    • 2.5.2
    • 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.

       

      Attachments

        Activity

          People

            paulk Paul King
            itoy Yuichi ITO
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: