db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1494541 - in /db/derby/code/trunk/java/client/org/apache/derby: client/am/ client/net/ jdbc/
Date Wed, 19 Jun 2013 10:49:40 GMT
Author: kahatlen
Date: Wed Jun 19 10:49:39 2013
New Revision: 1494541

URL: http://svn.apache.org/r1494541
Log:
DERBY-6262: Simplify message-generating methods using varargs

Use varargs in more constructors in SqlException and
DisconnectException. Since the message arguments in some of those
methods were not the last arguments, some reordering of arguments in
the callers was needed.

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
    db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientResultSet.java Wed Jun
19 10:49:39 2013
@@ -5515,7 +5515,7 @@ public abstract class ClientResultSet im
             } catch (IOException ioe) {                
                 throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.JAVA_EXCEPTION), 
-                        "java.io.IOException", ioe.getMessage(), ioe);
+                        ioe, "java.io.IOException", ioe.getMessage());
             }
             currentStream = null;
         }
@@ -5526,7 +5526,7 @@ public abstract class ClientResultSet im
             } catch (IOException ioe) {                
                 throw new SqlException(agent_.logWriter_,
                         new ClientMessageId(SQLState.JAVA_EXCEPTION), 
-                        "java.io.IOException", ioe.getMessage(), ioe);
+                        ioe, "java.io.IOException", ioe.getMessage());
             }
             currentReader = null;
         }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java Wed Jun
19 10:49:39 2013
@@ -706,8 +706,8 @@ final class CrossConverters {
             throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId 
                     (SQLState.LANG_FORMAT_EXCEPTION), 
-                    ClientTypes.getTypeString(targetDriverType),
-                    e);                    
+                    e,
+                    ClientTypes.getTypeString(targetDriverType));
         }
     }
 
@@ -851,7 +851,7 @@ final class CrossConverters {
             } catch (IOException e) {
                 throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId(SQLState.JAVA_EXCEPTION),
-                    e.getClass().getName(), e.getMessage(), e);
+                    e, e.getClass().getName(), e.getMessage());
             }
 
             if (length != CrossConverters.UNKNOWN_LENGTH &&
@@ -1109,7 +1109,7 @@ final class CrossConverters {
         } catch (NumberFormatException e) {
             throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId 
-                    (SQLState.LANG_FORMAT_EXCEPTION), "byte", e);
+                    (SQLState.LANG_FORMAT_EXCEPTION), e, "byte");
         }
     }
 
@@ -1166,7 +1166,7 @@ final class CrossConverters {
             throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId 
                     (SQLState.LANG_FORMAT_EXCEPTION), 
-                    "short", e);
+                    e, "short");
         }
     }
 
@@ -1212,7 +1212,7 @@ final class CrossConverters {
         } catch (NumberFormatException e) {
             throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId (SQLState.LANG_FORMAT_EXCEPTION),
-                    "int", e);
+                    e, "int");
         }
     }
 
@@ -1248,7 +1248,7 @@ final class CrossConverters {
         } catch (NumberFormatException e) {
             throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId (SQLState.LANG_FORMAT_EXCEPTION),
-                    "long", e);
+                    e, "long");
         }
     }
 
@@ -1274,7 +1274,7 @@ final class CrossConverters {
         } catch (NumberFormatException e) {
             throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId (SQLState.LANG_FORMAT_EXCEPTION),
-                    "float", e);
+                    e, "float");
         }
     }
 
@@ -1290,7 +1290,7 @@ final class CrossConverters {
         } catch (NumberFormatException e) {
             throw new SqlException(agent_.logWriter_, 
                     new ClientMessageId (SQLState.LANG_FORMAT_EXCEPTION),
-                    "double", e);
+                    e, "double");
         }
     }
 
@@ -1305,7 +1305,7 @@ final class CrossConverters {
         } catch (NumberFormatException e) {
             throw new SqlException(agent_.logWriter_,
                     new ClientMessageId (SQLState.LANG_FORMAT_EXCEPTION),
-                    "java.math.BigDecimal", e);
+                    e, "java.math.BigDecimal");
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java Wed Jun 19 10:49:39
2013
@@ -394,7 +394,7 @@ public abstract class Cursor {
         } catch (IllegalArgumentException e) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId (SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE),
-                "double", e);
+                e, "double");
         }
     }
 
@@ -409,11 +409,11 @@ public abstract class Cursor {
         } catch (ArithmeticException e) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId (SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE),
-                targetType, e);
+                e, targetType);
         } catch (IllegalArgumentException e) {
             throw new SqlException(agent_.logWriter_,
                 new ClientMessageId (SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE),
-                targetType, e);
+                e, targetType);
         }
     }
 
@@ -599,8 +599,8 @@ public abstract class Cursor {
                 (
                  agent_.logWriter_, 
                  new ClientMessageId (SQLState.NET_MARSHALLING_UDT_ERROR),
-                 e.getMessage(),
-                 e
+                 e,
+                 e.getMessage()
                  );
         }
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java Wed Jun 19 10:49:39
2013
@@ -372,7 +372,7 @@ public class Decimal {
         if (bigPrecision > 31) {
             throw new SqlException(null,
                 new ClientMessageId(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE),
-                "packed decimal", new SqlCode(-405));
+                new SqlCode(-405), "packed decimal");
         }
 
         int bigScale = b.scale();
@@ -383,7 +383,7 @@ public class Decimal {
             if (bigWholeIntegerLength > declaredWholeIntegerLength) {
                 throw new SqlException(null,
                     new ClientMessageId(SQLState.NUMERIC_OVERFLOW),
-                    b.toString(), "packed decimal", new SqlCode(-413));
+                    new SqlCode(-413), b.toString(), "packed decimal");
             }
         }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java Wed
Jun 19 10:49:39 2013
@@ -34,43 +34,20 @@ public class DisconnectException extends
             agent.disconnectEvent();
         }
     }
-    
-    private DisconnectException(Agent agent, ClientMessageId msgid,
-        Object[] args, SqlCode sqlcode) {
-        this(agent, msgid, args, sqlcode, (Throwable)null);
-    }
 
-    private DisconnectException(Agent agent, ClientMessageId msgid,
-        Object[] args) {
-        this(agent, msgid, args, SqlCode.disconnectError);
-    }
-    
     public DisconnectException(Agent agent, ClientMessageId msgid,
-        Object[] args, Throwable t) {
+                               Throwable t, Object... args) {
         this(agent, msgid, args, SqlCode.disconnectError, (Throwable)t);
     }
-    
-    public DisconnectException(Agent agent, ClientMessageId msgid,
-        Object arg1, Throwable t) {
-        this(agent, msgid, new Object[] { arg1 }, t);
-    }
 
-    public DisconnectException(Agent agent, ClientMessageId msgid) {
-        this(agent, msgid, (Object[])null);
-    }
-    
-    public DisconnectException(Agent agent, ClientMessageId msgid, Object arg1) {
-        this(agent, msgid, new Object[] { arg1 });
-    }
-        
-    public DisconnectException(Agent agent, ClientMessageId msgid, Object arg1,
-        Object arg2) {
-        this(agent, msgid, new Object[] { arg1, arg2 });
+    public DisconnectException(Agent agent, ClientMessageId msgid,
+                               Object... args) {
+        this(agent, msgid, (Throwable) null, args);
     }
     
     public DisconnectException(Agent agent, SqlException e) {
         super(agent.logWriter_,
             new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
-            e.getMessage(), e);
+            e, e.getMessage());
     }
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java Wed Jun 19 10:49:39
2013
@@ -250,8 +250,8 @@ public abstract class Lob implements Uni
             throw new SqlException(null,
                         new ClientMessageId(
                             SQLState.LANG_STREAMING_COLUMN_I_O_EXCEPTION),
-                            typeDesc,
-                            ioe
+                            ioe,
+                            typeDesc
                     );
         }
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java Wed Jun 19
10:49:39 2013
@@ -181,32 +181,19 @@ public class SqlException extends Except
         this.errorcode_ = sqlcode.getCode();
     }
 
-    private SqlException(
-        LogWriter logWriter,
-        ClientMessageId msgid,
-        Object[] args,
-        SqlCode sqlcode) {
-
+    public SqlException(LogWriter logWriter, ClientMessageId msgid,
+                        SqlCode sqlcode, Object... args) {
         this(logWriter, msgid, args, sqlcode, (Throwable)null);
     }
-        
-    SqlException(LogWriter logWriter, ClientMessageId msgid, Object arg1,
-        SqlCode sqlcode) {
-        this(logWriter, msgid, new Object[] {arg1}, sqlcode);
-    }
-        
-    public SqlException(LogWriter logWriter, ClientMessageId msgid, Object arg1,
-        Object arg2, SqlCode sqlcode) {
-        this(logWriter, msgid, new Object[] {arg1, arg2}, sqlcode);
-    }
- 
+
     // The following constructors are all wrappers around the base constructor,
     // created to make it easy to code against them (you don't have to pass
     // null arguments or construct object arrays).  See the javadoc for the
     // "base" constructor for an explanation of the parameters
-    public SqlException (LogWriter logwriter, 
-            ClientMessageId msgid, Throwable cause) {
-        this (logwriter, msgid, (Object[])null, cause);
+
+    public SqlException(LogWriter logWriter, ClientMessageId msgid,
+                        Throwable cause, Object... args) {
+        this(logWriter, msgid, args, cause);
     }
     
     public SqlException(LogWriter logwriter,
@@ -216,18 +203,6 @@ public class SqlException extends Except
         this(logwriter, msgid, args, (Throwable)null);
     }
 
-    public SqlException(LogWriter logwriter, ClientMessageId msgid, 
-            Object arg1, Throwable cause)
-    {
-        this(logwriter, msgid, new Object[] { arg1 }, cause);
-    }
-    
-    public SqlException(LogWriter logwriter, ClientMessageId msgid,
-        Object arg1, Object arg2, Throwable cause)
-    {
-        this(logwriter, msgid, new Object[] { arg1, arg2 }, cause);
-    }
-    
     /**
      * Create an exception for an engine generated error.
      *

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetAgent.java Wed Jun 19 10:49:39
2013
@@ -142,9 +142,9 @@ public class NetAgent extends Agent {
         } catch (PrivilegedActionException e) {
             throw new DisconnectException(this,
                 new ClientMessageId(SQLState.CONNECT_UNABLE_TO_CONNECT_TO_SERVER),
-                new Object[] { e.getException().getClass().getName(), server, 
-                    Integer.toString(port), e.getException().getMessage() },
-                e.getException());
+                e.getException(),
+                e.getException().getClass().getName(), server, port,
+                e.getException().getMessage());
         }
 
         // Set TCP/IP Socket Properties
@@ -161,7 +161,7 @@ public class NetAgent extends Agent {
             }
             exceptionOpeningSocket_ = new DisconnectException(this,
                 new ClientMessageId(SQLState.CONNECT_SOCKET_EXCEPTION),
-                e.getMessage(), e);
+                e, e.getMessage());
         }
 
         try {
@@ -176,7 +176,7 @@ public class NetAgent extends Agent {
             }
             exceptionOpeningSocket_ = new DisconnectException(this, 
                 new ClientMessageId(SQLState.CONNECT_UNABLE_TO_OPEN_SOCKET_STREAM),
-                e.getMessage(), e);
+                e, e.getMessage());
         }
 
         ebcdicCcsidManager_ = new EbcdicCcsidManager();
@@ -257,7 +257,7 @@ public class NetAgent extends Agent {
             }
             throw new SqlException(logWriter_, 
                 new ClientMessageId(SQLState.SOCKET_EXCEPTION),
-                e.getMessage(), e);
+                e, e.getMessage());
         }
     }
 
@@ -295,7 +295,7 @@ public class NetAgent extends Agent {
                 // changing {4} to e.getMessage() may require pub changes
                 accumulatedExceptions = new SqlException(logWriter_,
                     new ClientMessageId(SQLState.COMMUNICATION_ERROR),
-                    e.getMessage(), e);
+                    e, e.getMessage());
             } finally {
                 rawSocketInputStream_ = null;
             }
@@ -311,7 +311,7 @@ public class NetAgent extends Agent {
                 // changing {4} to e.getMessage() may require pub changes
                 SqlException latestException = new SqlException(logWriter_,
                     new ClientMessageId(SQLState.COMMUNICATION_ERROR),
-                    e.getMessage(), e);
+                    e, e.getMessage());
                 accumulatedExceptions = Utils.accumulateSQLException(latestException, accumulatedExceptions);
             } finally {
                 rawSocketOutputStream_ = null;
@@ -328,7 +328,7 @@ public class NetAgent extends Agent {
                 // add this to the message pubs.
                 SqlException latestException = new SqlException(logWriter_,
                     new ClientMessageId(SQLState.COMMUNICATION_ERROR),
-                        e.getMessage(), e);
+                        e, e.getMessage());
                 accumulatedExceptions = Utils.accumulateSQLException(latestException, accumulatedExceptions);
             } finally {
                 socket_ = null;
@@ -432,7 +432,7 @@ public class NetAgent extends Agent {
         accumulateChainBreakingReadExceptionAndThrow(
             new DisconnectException(this,
                 new ClientMessageId(SQLState.COMMUNICATION_ERROR),
-                cause.getMessage(), cause));
+                cause, cause.getMessage()));
     }
         
     // ----------------------- call-down methods ---------------------------------

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java Wed Jun
19 10:49:39 2013
@@ -425,7 +425,7 @@ public class NetConnection extends Clien
             {
                 exceptionToBeThrown = new SqlException(agent_.logWriter_, 
                     new ClientMessageId(SQLState.JAVA_EXCEPTION),
-                    e.getClass().getName(), e.getMessage(), e);
+                    e, e.getClass().getName(), e.getMessage());
             }
 
             try {
@@ -474,7 +474,7 @@ public class NetConnection extends Clien
             {
                 exceptionToBeThrown = new SqlException(agent_.logWriter_,
                     new ClientMessageId(SQLState.JAVA_EXCEPTION),
-                    e.getClass().getName(), e.getMessage(), e);
+                    e, e.getClass().getName(), e.getMessage());
             }
 
             try {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java Wed
Jun 19 10:49:39 2013
@@ -852,10 +852,8 @@ class NetConnectionReply extends Reply
             new DisconnectException(
                 agent_,
                 new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
-                msgutil_.getTextMessage(
-                    MessageId.CONN_DRDA_CMDCHKRM),
-                new SqlException(agent_.logWriter_,
-                                 netSqlca)));
+                new SqlException(agent_.logWriter_, netSqlca),
+                msgutil_.getTextMessage(MessageId.CONN_DRDA_CMDCHKRM)));
     }
 
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java Wed
Jun 19 10:49:39 2013
@@ -1552,7 +1552,7 @@ class NetStatementReply extends NetPacka
             netCursor.extdtaData_.add(data);
         } catch (OutOfMemoryError e) {
             agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
-                new ClientMessageId(SQLState.NET_LOB_DATA_TOO_LARGE_FOR_JVM), null, e));
+                new ClientMessageId(SQLState.NET_LOB_DATA_TOO_LARGE_FOR_JVM), e));
         }
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java Wed Jun
19 10:49:39 2013
@@ -878,9 +878,9 @@ public class NetXAResource implements XA
             // create an SqlException to report this error within
             SqlException accumSql = new SqlException(conn_.netAgent_.logWriter_,
                 new ClientMessageId(SQLState.NET_XARETVAL_ERROR),
+                SqlCode.queuedXAError,
                 getXAFuncStr(callInfo.xaFunction_),
-                getXAExceptionText(rc),
-                SqlCode.queuedXAError);
+                getXAExceptionText(rc));
             exceptionsOnXA = Utils.accumulateSQLException
                     (accumSql, exceptionsOnXA);
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java Wed Jun 19 10:49:39
2013
@@ -324,7 +324,7 @@ class Request {
                         new SqlException(
                             netAgent_.logWriter_,
                             new ClientMessageId(SQLState.NET_EXCEPTION_ON_READ),
-                            parameterIndex, e.getMessage(), e));
+                            e, parameterIndex, e.getMessage()));
 
                     return;
                 }
@@ -365,7 +365,7 @@ class Request {
                     netAgent_.logWriter_,
                     new ClientMessageId(
                         SQLState.NET_EXCEPTION_ON_STREAMLEN_VERIFICATION),
-                    parameterIndex, e.getMessage(), e));
+                    e, parameterIndex, e.getMessage()));
         }
         // Write the status byte to the send buffer.
         if (writeEXTDTAStatusByte) {
@@ -467,7 +467,7 @@ class Request {
             final SqlException sqlex = 
                 new SqlException(netAgent_.logWriter_,
                                  new ClientMessageId(SQLState.NET_EXCEPTION_ON_READ),
-                                 parameterIndex, e.getMessage(), e);
+                                 e, parameterIndex, e.getMessage());
 
             netAgent_.accumulateReadException(sqlex);
             
@@ -1382,8 +1382,8 @@ class Request {
                 (
                  netAgent_.logWriter_, 
                  new ClientMessageId (SQLState.NET_MARSHALLING_UDT_ERROR),
-                 e.getMessage(),
-                 e
+                 e,
+                 e.getMessage()
                  );
         }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSourceRoot.java Wed
Jun 19 10:49:39 2013
@@ -685,7 +685,7 @@ public abstract class ClientBaseDataSour
             // automatically traced
             throw new SqlException(null,
                 new ClientMessageId(SQLState.INVALID_ATTRIBUTE_SYNTAX),
-                attributeString, e);
+                e, attributeString);
         }
         checkBoolean(augmentedProperties,
                      Attribute.CLIENT_RETIEVE_MESSAGE_TEXT);
@@ -1110,7 +1110,7 @@ public abstract class ClientBaseDataSour
             // consistent with the embedded driver.
             throw new SqlException(logWriter,
                     new ClientMessageId(SQLState.MALFORMED_URL),
-                    constructUrl(), sqle).getSQLException();
+                    sqle, constructUrl()).getSQLException();
 
         }
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java?rev=1494541&r1=1494540&r2=1494541&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java Wed Jun 19 10:49:39
2013
@@ -122,7 +122,7 @@ public class ClientDriver implements Dri
                     // A null log writer is passed, because jdbc 1 sqlexceptions are automatically
traced
                     throw new SqlException(null, 
                         new ClientMessageId(SQLState.MALFORMED_URL),
-                        url, e);
+                        e, url);
                 }
             }
             String server = tokenizeServerName(urlTokenizer, url);    // "/server"
@@ -392,7 +392,7 @@ public class ClientDriver implements Dri
         } catch (NoSuchElementException e) {
             // A null log writer is passed, because jdbc 1 sqlexceptions are automatically
traced
             throw new SqlException(null, 
-                new ClientMessageId(SQLState.MALFORMED_URL), url, e);
+                new ClientMessageId(SQLState.MALFORMED_URL), e, url);
         }
     }
 
@@ -406,7 +406,7 @@ public class ClientDriver implements Dri
         } catch (NoSuchElementException e) {
             // A null log writer is passed, because jdbc 1 sqlexceptions are automatically
traced
             throw new SqlException(null, 
-                new ClientMessageId(SQLState.MALFORMED_URL), url, e);
+                new ClientMessageId(SQLState.MALFORMED_URL), e, url);
         }
     }
 



Mime
View raw message