ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r579975 - in /ant/core/trunk/src/main/org/apache/tools/ant: taskdefs/StreamPumper.java util/ReaderInputStream.java
Date Thu, 27 Sep 2007 11:05:22 GMT
Author: peterreilly
Date: Thu Sep 27 04:05:21 2007
New Revision: 579975

URL: http://svn.apache.org/viewvc?rev=579975&view=rev
Log:
remove a couple of inner assignments

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java
    ant/core/trunk/src/main/org/apache/tools/ant/util/ReaderInputStream.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java?rev=579975&r1=579974&r2=579975&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/StreamPumper.java Thu Sep 27 04:05:21
2007
@@ -89,7 +89,11 @@
 
         int length;
         try {
-            while ((length = is.read(buf)) > 0 && !finish) {
+            while (true) {
+                length = is.read(buf);
+                if ((length <= 0) || finish) {
+                    break;
+                }
                 os.write(buf, 0, length);
                 if (autoflush) {
                     os.flush();

Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/ReaderInputStream.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/ReaderInputStream.java?rev=579975&r1=579974&r2=579975&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/ReaderInputStream.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/ReaderInputStream.java Thu Sep 27 04:05:21
2007
@@ -130,7 +130,8 @@
 
         System.arraycopy(slack, begin, b, off, len);
 
-        if ((begin += len) >= slack.length) {
+        begin += len;
+        if (begin >= slack.length) {
             slack = null;
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message