Fixed JDK-1.5-specific Array.toString() call.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@546743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Marc Prud'hommeaux 2007-06-13 05:41:16 +00:00
parent 43eb43898a
commit d72a5ad309
1 changed files with 9 additions and 3 deletions

View File

@ -391,10 +391,16 @@ public class DB2Dictionary
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[]{}))));
+ ", Errd=" + errdStr);
String Warn = new String((char[])getSqlWarnMethd.
invoke(sqlca, new Object[]{}));
if(Warn.trim().length() != 0)