You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2010/08/15 11:09:37 UTC

svn commit: r985632 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java

Author: hibou
Date: Sun Aug 15 09:09:37 2010
New Revision: 985632

URL: http://svn.apache.org/viewvc?rev=985632&view=rev
Log:
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.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=985632&r1=985631&r2=985632&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Sun Aug 15 09:09:37 2010
@@ -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:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java?rev=985632&r1=985631&r2=985632&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java Sun Aug 15 09:09:37 2010
@@ -257,7 +257,7 @@ public class PumpStreamHandler implement
     /*protected*/ StreamPumper createInputPump(InputStream is, OutputStream os,
                                 boolean closeWhenExhausted) {
         StreamPumper pumper = new StreamPumper(is, os, closeWhenExhausted,
-                                               false);
+                                               true);
         pumper.setAutoflush(true);
         return pumper;
     }