7049107: Cannot call initCause() on BatchUpdateException

Reviewed-by: darcy
This commit is contained in:
Lance Andersen 2011-06-02 12:02:14 -04:00
parent 582efc86b4
commit 82ecc2e8ea

View File

@ -79,7 +79,8 @@ public class BatchUpdateException extends SQLException {
*/ */
public BatchUpdateException( String reason, String SQLState, int vendorCode, public BatchUpdateException( String reason, String SQLState, int vendorCode,
int[] updateCounts ) { 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, public BatchUpdateException(String reason, String SQLState,
int[] updateCounts) { 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 * @since 1.2
*/ */
public BatchUpdateException(String reason, int[] updateCounts) { 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 * @since 1.2
*/ */
public BatchUpdateException(int[] updateCounts) { 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 * @since 1.2
*/ */
public BatchUpdateException() { public BatchUpdateException() {
this(null, null, 0, null, null); this(null, null, 0, null);
} }
/** /**