ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r441945 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW contributors.xml src/main/org/apache/tools/ant/util/ReaderInputStream.java
Date Sun, 10 Sep 2006 12:04:07 GMT
Author: peterreilly
Date: Sun Sep 10 05:04:07 2006
New Revision: 441945

URL: http://svn.apache.org/viewvc?view=rev&rev=441945
Log:
bugzilla report 39635: bugs in readerinputstream

Modified:
    ant/core/trunk/CONTRIBUTORS
    ant/core/trunk/WHATSNEW
    ant/core/trunk/contributors.xml
    ant/core/trunk/src/main/org/apache/tools/ant/util/ReaderInputStream.java

Modified: ant/core/trunk/CONTRIBUTORS
URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?view=diff&rev=441945&r1=441944&r2=441945
==============================================================================
Binary files - no diff available.

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=441945&r1=441944&r2=441945
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Sun Sep 10 05:04:07 2006
@@ -18,6 +18,7 @@
 * Exception reporting in <copy> was broken. Bugzilla report 40300.
 * Handling of corrupt tar files, TarInputStream.read() never returns EOF.
   Bugzilla report 39924.
+* Some bugs in ReaderInputStream. Bugzilla report 39635.
 
 Other changes:
 --------------

Modified: ant/core/trunk/contributors.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?view=diff&rev=441945&r1=441944&r2=441945
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Sun Sep 10 05:04:07 2006
@@ -959,6 +959,10 @@
     <last>Eugelink</last>
   </name>
   <name>
+    <first>Trejkaz</first>
+    <last>Xaoz</last>
+  </name>
+  <name>
     <first>Ulrich</first>
     <last>Schmidt</last>
   </name>

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?view=diff&rev=441945&r1=441944&r2=441945
==============================================================================
--- 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 Sun Sep 10 05:04:07
2006
@@ -85,16 +85,13 @@
         } else {
             byte[] buf = new byte[1];
             if (read(buf, 0, 1) <= 0) {
-                result = -1;
+                return -1;
+            } else {
+                result = buf[0];
             }
-            result = buf[0];
         }
 
-        if (result < -1) {
-            result += 256;
-        }
-
-        return result;
+        return result & 0xFF;
     }
 
     /**
@@ -112,7 +109,9 @@
         if (in == null) {
             throw new IOException("Stream Closed");
         }
-
+        if (len == 0) {
+            return 0;
+        }
         while (slack == null) {
             char[] buf = new char[len]; // might read too much
             int n = in.read(buf);



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


Mime
View raw message