From 0c87a0e1878e3adaaa97217b3f4ca01989c18985 Mon Sep 17 00:00:00 2001 From: lancea Date: Tue, 10 May 2011 14:41:18 -0400 Subject: [PATCH] 7043443: address missed reason initialization in BatchUpdateException Reviewed-by: alanb --- src/share/classes/java/sql/BatchUpdateException.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/share/classes/java/sql/BatchUpdateException.java b/src/share/classes/java/sql/BatchUpdateException.java index 4fa624116..8405da2da 100644 --- a/src/share/classes/java/sql/BatchUpdateException.java +++ b/src/share/classes/java/sql/BatchUpdateException.java @@ -89,7 +89,7 @@ public class BatchUpdateException extends SQLException { * The cause 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. *

* * @param reason a description of the exception @@ -188,7 +188,7 @@ public class BatchUpdateException extends SQLException { * @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 @@ public class BatchUpdateException extends SQLException { * @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); } /** -- GitLab