openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mprud...@apache.org
Subject svn commit: r546743 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Date Wed, 13 Jun 2007 05:41:17 GMT
Author: mprudhom
Date: Tue Jun 12 22:41:16 2007
New Revision: 546743

URL: http://svn.apache.org/viewvc?view=rev&rev=546743
Log:
Fixed JDK-1.5-specific Array.toString() call.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?view=diff&rev=546743&r1=546742&r2=546743
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Tue Jun 12 22:41:16 2007
@@ -391,10 +391,16 @@
             getMethod("getSqlWarn", null);
             Method  getSqlErrdMethd = sqlca.getClass().
             getMethod("getSqlErrd", null);
+            StringBuffer errdStr = new StringBuffer();
+
+            int[] errds = (int[]) getSqlErrdMethd.invoke(sqlca, new Object[]{});
+            for (int i = 0; i < errds.length; i++)
+                errdStr.append(errdStr.length() > 0 ? ", " : "").
+                    append(errds[i]);
             exceptionMsg = exceptionMsg.concat( "SQLCA OUTPUT" +
-                    "[Errp=" +getSqlErrpMethd.invoke(sqlca,new Object[]{})
-                    + ", Errd=" + Arrays.toString((int[])
-                            (getSqlErrdMethd.invoke(sqlca, new Object[]{}))));
+                    "[Errp=" + getSqlErrpMethd.invoke(sqlca, new Object[]{})
+                    + ", Errd=" + errdStr);
+
             String Warn = new String((char[])getSqlWarnMethd.
                     invoke(sqlca, new Object[]{}));
             if(Warn.trim().length() != 0)



Mime
View raw message