OK today really is not my day WRT e-mail. I am going to try this one more time.

-------- Original Message --------
Subject: FYI: ChunkedInputStream.read()
Date: Thu, 16 Feb 2006 13:47:13 -0800
From: David Daney <[EMAIL PROTECTED]>
To: David Daney <[EMAIL PROTECTED]>
CC: Classpath Patches \ <classpath-patches@gnu.org>
References: <[EMAIL PROTECTED]>

For some reason that is a little unclear to me I originally sent this to
  Keith Seitz insted of the list.  Sorry for the noise Keith.


David Daney wrote:
I just committed this. ChunkedInputStream.read() was returning values outside of the allowed range of 0-255.

2006-02-16  David Daney  <[EMAIL PROTECTED]>

    PR classpath/26312
    * gnu/java/net/protocol/http/ChunkedInputStream.java (read): Mask
    return value with 0xff.

David Daney.


------------------------------------------------------------------------

? d
? tools/tools.zip
Index: gnu/java/net/protocol/http/ChunkedInputStream.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/java/net/protocol/http/ChunkedInputStream.java,v
retrieving revision 1.5
diff -u -p -r1.5 ChunkedInputStream.java
--- gnu/java/net/protocol/http/ChunkedInputStream.java  26 Jan 2006 00:43:36 
-0000      1.5
+++ gnu/java/net/protocol/http/ChunkedInputStream.java  16 Feb 2006 21:35:39 
-0000
@@ -91,12 +91,7 @@ public class ChunkedInputStream
       {
         return -1;
       }
-    int ret = (int) buf[0];
-    if (ret < 0)
-      {
-        ret += 0x100;
-      }
-    return ret;
+    return 0xff & buf[0];
   }
public int read(byte[] buffer)


Reply via email to