harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r437600 - in /incubator/harmony/enhanced/classlib/trunk/modules/sql/src: main/java/java/sql/SQLException.java test/java/org/apache/harmony/sql/tests/java/sql/SQLExceptionTest.java
Date Mon, 28 Aug 2006 08:32:31 GMT
Author: pyang
Date: Mon Aug 28 01:32:30 2006
New Revision: 437600

URL: http://svn.apache.org/viewvc?rev=437600&view=rev
Log:
Patch applied for HARMONY-1291 ([classlib][sql] java.sql.SQLException#setNextException(SQLException
ex) behaves incorrectly)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLException.java
    incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLExceptionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLException.java?rev=437600&r1=437599&r2=437600&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLException.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLException.java
Mon Aug 28 01:32:30 2006
@@ -136,13 +136,16 @@
     }
 
     /**
-     * Sets the SQLException chained to this SQLException. If there is an
-     * existing SQLException chained to this SQLException, it is replaced.
+     * Adds the SQLException to the end of this SQLException chain.
      * 
      * @param ex
-     *            the SQLException to chain to this SQLException
+     *            the new SQLException to be added to the end of the chain
      */
-    public void setNextException(SQLException ex) {
-        next = ex;
+    public void setNextException(SQLException ex) {    
+        if (next != null) {
+            next.setNextException(ex);
+        } else {
+            next = ex;
+        }
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/SQLExceptionTest.java?rev=437600&r1=437599&r2=437600&view=diff
==============================================================================
Binary files /tmp/tmpa1aRLA and /tmp/tmppjQ_Ql differ



Mime
View raw message