From 82ecc2e8eae27d60bef2a1c6460607784136c6d8 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Thu, 2 Jun 2011 12:02:14 -0400 Subject: [PATCH] 7049107: Cannot call initCause() on BatchUpdateException Reviewed-by: darcy --- .../share/classes/java/sql/BatchUpdateException.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jdk/src/share/classes/java/sql/BatchUpdateException.java b/jdk/src/share/classes/java/sql/BatchUpdateException.java index 8405da2dac7..19742c82fa7 100644 --- a/jdk/src/share/classes/java/sql/BatchUpdateException.java +++ b/jdk/src/share/classes/java/sql/BatchUpdateException.java @@ -79,7 +79,8 @@ public class BatchUpdateException extends SQLException { */ public BatchUpdateException( String reason, String SQLState, int vendorCode, int[] updateCounts ) { - this(reason, SQLState, vendorCode, updateCounts, null); + super(reason, SQLState, vendorCode); + this.updateCounts = (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.length); } /** @@ -106,7 +107,7 @@ public class BatchUpdateException extends SQLException { */ public BatchUpdateException(String reason, String SQLState, int[] updateCounts) { - this(reason, SQLState, 0, updateCounts, null); + this(reason, SQLState, 0, updateCounts); } /** @@ -132,7 +133,7 @@ public class BatchUpdateException extends SQLException { * @since 1.2 */ public BatchUpdateException(String reason, int[] updateCounts) { - this(reason, null, 0, updateCounts, null); + this(reason, null, 0, updateCounts); } /** @@ -155,7 +156,7 @@ public class BatchUpdateException extends SQLException { * @since 1.2 */ public BatchUpdateException(int[] updateCounts) { - this(null, null, 0, updateCounts, null); + this(null, null, 0, updateCounts); } /** @@ -170,7 +171,7 @@ public class BatchUpdateException extends SQLException { * @since 1.2 */ public BatchUpdateException() { - this(null, null, 0, null, null); + this(null, null, 0, null); } /**