db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r393606 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/Sqlca.java client/org/apache/derby/client/net/Typdef.java testing/org/apache/derbyTesting/functionTests/suites/encodingTests.runall
Date Wed, 12 Apr 2006 20:46:44 GMT
Author: kmarsden
Date: Wed Apr 12 13:46:43 2006
New Revision: 393606

URL: http://svn.apache.org/viewcvs?rev=393606&view=rev
Log:
DERBY-900 -  Remove use of String(byte[]) and String(byte[], int, int) constructors in network
client leading to non-portable behaviour


Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encodingTests.runall

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java?rev=393606&r1=393605&r2=393606&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java Wed Apr 12 13:46:43
2006
@@ -21,6 +21,7 @@
 package org.apache.derby.client.am;
 
 import org.apache.derby.shared.common.reference.SQLState;
+import org.apache.derby.client.net.Typdef;
 
 public abstract class Sqlca {
     transient protected Connection connection_;
@@ -374,7 +375,8 @@
 
     private String bytes2String(byte[] bytes, int offset, int length)
             throws java.io.UnsupportedEncodingException {
-        return new String(bytes, offset, length);
+        // Network server uses utf8 encoding
+        return new String(bytes, offset, length, Typdef.UTF8ENCODING);
     }
 
     public int getUpdateCount() {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java?rev=393606&r1=393605&r2=393606&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java Wed Apr 12 13:46:43
2006
@@ -153,7 +153,7 @@
     // lob length
     static final short LOBLENGTH = 4;
 
-    static final String UTF8ENCODING = "UTF8";
+    public static final String UTF8ENCODING = "UTF8";
 
     private static final int OVERRIDE_TABLE_SIZE = 0xff;
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encodingTests.runall
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encodingTests.runall?rev=393606&r1=393605&r2=393606&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encodingTests.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/encodingTests.runall
Wed Apr 12 13:46:43 2006
@@ -1 +1,2 @@
 jdbcapi/lobStreams.java
+lang/ConcurrentImplicitCreateSchema.java



Mime
View raw message