conor 2003/02/16 06:05:42
Modified: src/main/org/apache/tools/ant/taskdefs StreamPumper.java Log: Make sure stream gets closed when input finishes Revision Changes Path 1.12 +3 -3 ant/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java Index: StreamPumper.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -u -r1.11 -r1.12 --- StreamPumper.java 16 Feb 2003 14:04:28 -0000 1.11 +++ StreamPumper.java 16 Feb 2003 14:05:42 -0000 1.12 @@ -119,12 +119,12 @@ while ((length = is.read(buf)) > 0) { os.write(buf, 0, length); } - if (closeWhenExhausted) { - os.close(); - } } catch (Exception e) { // ignore errors } finally { + if (closeWhenExhausted) { + os.close(); + } synchronized (this) { finished = true; notify();