ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r943929 - /ant/core/trunk/src/main/org/apache/tools/ant/DemuxInputStream.java
Date Thu, 13 May 2010 16:26:26 GMT
Author: jkf
Date: Thu May 13 16:26:25 2010
New Revision: 943929

URL: http://svn.apache.org/viewvc?rev=943929&view=rev
Log:
Pr 49279, DemuxInputStream.read() should return unsigned values
(mandated by contract of InputStream)


Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/DemuxInputStream.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DemuxInputStream.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DemuxInputStream.java?rev=943929&r1=943928&r2=943929&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/DemuxInputStream.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DemuxInputStream.java Thu May 13 16:26:25
2010
@@ -30,6 +30,7 @@ import java.io.InputStream;
  */
 public class DemuxInputStream extends InputStream {
 
+    private static final int MASK_8BIT = 0xFF;
     /**
      * The project to from which to get input.
      */
@@ -54,7 +55,7 @@ public class DemuxInputStream extends In
         if (project.demuxInput(buffer, 0, 1) == -1) {
             return -1;
         }
-        return buffer[0];
+        return buffer[0] & MASK_8BIT;
     }
 
 



Mime
View raw message