db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r740165 - /db/derby/code/branches/10.4/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java
Date Tue, 03 Feb 2009 00:37:05 GMT
Author: kmarsden
Date: Tue Feb  3 00:37:05 2009
New Revision: 740165

URL: http://svn.apache.org/viewvc?rev=740165&view=rev
Log:
DERBY-576  xaHelper in ij creates global id that is not the same across platforms



Modified:
    db/derby/code/branches/10.4/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java

Modified: db/derby/code/branches/10.4/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java?rev=740165&r1=740164&r2=740165&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java (original)
+++ db/derby/code/branches/10.4/java/tools/org/apache/derby/impl/tools/ij/xaHelper.java Tue
Feb  3 00:37:05 2009
@@ -22,6 +22,8 @@
 package org.apache.derby.impl.tools.ij;
 
 import org.apache.derby.iapi.tools.i18n.LocalizedResource;
+
+import java.io.UnsupportedEncodingException;
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.Locale;
@@ -79,7 +81,13 @@
 		
 	private Xid makeXid(int xid)
 	{
-		return new ijXid(xid, databaseName.getBytes());
+		try {
+			return new ijXid(xid, databaseName.getBytes("UTF-8"));
+		} catch (UnsupportedEncodingException e) {
+			// UTF-8 is a required encoding. We should never get here.
+			e.printStackTrace();
+			return null;
+		}
 	}
 
 	public void XADataSourceStatement(ij parser, Token dbname, Token shutdown,



Mime
View raw message