db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r598458 - in /db/derby/code/trunk/java/client/org/apache/derby/client/am: BlobLocatorInputStream.java ClobLocatorInputStream.java
Date Mon, 26 Nov 2007 23:06:51 GMT
Author: kahatlen
Date: Mon Nov 26 15:06:50 2007
New Revision: 598458

URL: http://svn.apache.org/viewvc?rev=598458&view=rev
Log:
DERBY-3226: BlobLocatorInputStream.read() and ClobLocatorInputStream.read() don't mask out
sign bits

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java?rev=598458&r1=598457&r2=598458&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/BlobLocatorInputStream.java
Mon Nov 26 15:06:50 2007
@@ -120,7 +120,8 @@
         if (bytes.length == 0) { // EOF
             return -1;
         } else {
-            return bytes[0];
+            // convert byte in range [-128,127] to int in range [0,255]
+            return bytes[0] & 0xff;
         }
     }
     

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java?rev=598458&r1=598457&r2=598458&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java
Mon Nov 26 15:06:50 2007
@@ -110,7 +110,8 @@
         if (bytes.length == 0) { // EOF
             return -1;
         } else {
-            return bytes[0];
+            // convert byte in range [-128,127] to int in range [0,255]
+            return bytes[0] & 0xff;
         }
     }
     



Mime
View raw message