changeset 4221:6a3a41e0af88

7043443: address missed reason initialization in BatchUpdateException Reviewed-by: alanb
author lancea
date Tue, 10 May 2011 14:41:18 -0400
parents f4d804b21217
children 2147ec13c98e
files src/share/classes/java/sql/BatchUpdateException.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/sql/BatchUpdateException.java	Mon May 09 17:50:43 2011 -0700
+++ b/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);
     }
 
     /**