7043443: address missed reason initialization in BatchUpdateException
authorlancea
Tue, 10 May 2011 14:41:18 -0400
changeset 9684 90ce88ea5ade
parent 9683 75c24fb3b3d1
child 9686 0b94537ae69c
7043443: address missed reason initialization in BatchUpdateException Reviewed-by: alanb
jdk/src/share/classes/java/sql/BatchUpdateException.java
--- a/jdk/src/share/classes/java/sql/BatchUpdateException.java	Mon May 09 17:50:43 2011 -0700
+++ b/jdk/src/share/classes/java/sql/BatchUpdateException.java	Tue May 10 14:41:18 2011 -0400
@@ -89,7 +89,7 @@
    * The <code>cause</code> is not initialized, and may subsequently be
    * initialized by a call to the
    * {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
-   * is intialized to 0.
+   * is initialized to 0.
    * <p>
    *
    * @param reason a description of the exception
@@ -188,7 +188,7 @@
      * @since 1.6
      */
     public BatchUpdateException(Throwable cause) {
-        this(null, null, 0, null, cause);
+        this((cause == null ? null : cause.toString()), null, 0, null, cause);
     }
 
     /**
@@ -214,7 +214,7 @@
      * @since 1.6
      */
     public BatchUpdateException(int []updateCounts , Throwable cause) {
-        this(null, null, 0, updateCounts, cause);
+        this((cause == null ? null : cause.toString()), null, 0, updateCounts, cause);
     }
 
     /**