Browse Source

Bug #49119 :

A forked <java> task is creating a pumping thread on the input stream. The read was made blocking, so the pumping thread is still blocked after <java> finished. So it will steal the first flushed charaters from the input stream. Making the pumping non blocking fixed the issue.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@985632 13f79535-47bb-0310-9956-ffa450edef68
master
Nicolas Lalevee 15 years ago
parent
commit
11d029431b
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      WHATSNEW
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java

+ 4
- 0
WHATSNEW View File

@@ -119,6 +119,10 @@ Fixed bugs:
<zipfileset>s that used the prefix or fullpath attributes.
Bugzilla Report 49605.

* If forked, after finished <java> was still reading the input stream
for a bunch of characters, then stealing them from a following <input>.
Bugzilla Report 49119.

Other changes:
--------------



+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java View File

@@ -257,7 +257,7 @@ public class PumpStreamHandler implements ExecuteStreamHandler {
/*protected*/ StreamPumper createInputPump(InputStream is, OutputStream os,
boolean closeWhenExhausted) {
StreamPumper pumper = new StreamPumper(is, os, closeWhenExhausted,
false);
true);
pumper.setAutoflush(true);
return pumper;
}


Loading…
Cancel
Save