db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r541315 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/ClobAsciiStream.java
Date Thu, 24 May 2007 15:06:16 GMT
Author: kristwaa
Date: Thu May 24 08:06:15 2007
New Revision: 541315

URL: http://svn.apache.org/viewvc?view=rev&rev=541315
Log:
DERBY-2618: EmbedClob.setAsciiStream does not handle non-ascii characters correctly. Now also
and-ing bytes in write(byte[],int,int) with 0xff.
Patch file: derby2618_partial_v5-ontopofv4.diff

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/ClobAsciiStream.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/ClobAsciiStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/ClobAsciiStream.java?view=diff&rev=541315&r1=541314&r2=541315
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/ClobAsciiStream.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/ClobAsciiStream.java Thu May
24 08:06:15 2007
@@ -94,7 +94,7 @@
         {
             int clen = Math.min(len, buffer.length);
             for (int i = 0; i < clen; i++) {
-                buffer[i] = (char) b[off + i];
+                buffer[i] = (char)(b[off + i] & 0xff);
             }
             writer.write(buffer, 0, clen);
             off += clen;



Mime
View raw message