changeset 2882:1f99ad63eb9e

6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions Reviewed-by: alanb
author lancea
date Sat, 04 Sep 2010 12:21:56 -0400
parents a6c142240837
children d44696691445
files src/share/classes/java/sql/SQLDataException.java src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java src/share/classes/java/sql/SQLNonTransientConnectionException.java src/share/classes/java/sql/SQLSyntaxErrorException.java src/share/classes/java/sql/SQLTransactionRollbackException.java src/share/classes/java/sql/SQLTransientConnectionException.java
diffstat 7 files changed, 49 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/sql/SQLDataException.java	Fri Sep 03 15:00:10 2010 -0700
+++ b/src/share/classes/java/sql/SQLDataException.java	Sat Sep 04 12:21:56 2010 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,13 @@
 package java.sql;
 
 /**
- * The subclass of {@link SQLException} thrown when the SQLState class value is '<i>22</i>'. This indicates
- * various data errors, including but not limited to not-allowed conversion, division by 0
- * and invalid arguments to functions.
- *
+ * The subclass of {@link SQLException} thrown when the SQLState class value
+ * is '<i>22</i>', or under vendor-specified conditions.  This indicates
+ * various data errors, including but not limited to data conversion errors,
+ * division by 0, and invalid arguments to functions.
+ * <p>
+ * Please consult your driver vendor documentation for the vendor-specified
+ * conditions for which this <code>Exception</code> may be thrown.
  * @since 1.6
  */
 public class SQLDataException extends SQLNonTransientException {
--- a/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java	Fri Sep 03 15:00:10 2010 -0700
+++ b/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java	Sat Sep 04 12:21:56 2010 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,13 @@
 package java.sql;
 
 /**
- * The subclass of {@link SQLException} thrown when the SQLState class value is '<i>23</i>'. This indicates that an integrity
+ * The subclass of {@link SQLException} thrown when the SQLState class value
+ * is '<i>23</i>', or under vendor-specified conditions.
+ * This indicates that an integrity
  * constraint (foreign key, primary key or unique key) has been violated.
- *
+ * <p>
+ * Please consult your driver vendor documentation for the vendor-specified
+ * conditions for which this <code>Exception</code> may be thrown.
  * @since 1.6
  */
 public class SQLIntegrityConstraintViolationException extends SQLNonTransientException {
--- a/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java	Fri Sep 03 15:00:10 2010 -0700
+++ b/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java	Sat Sep 04 12:21:56 2010 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,13 @@
 package java.sql;
 
 /**
- * The subclass of {@link SQLException} thrown when the SQLState class value is '<i>28</i>'. This indicated that the
- * authorization credentials presented during connection establishment are not valid.
- *
+ * The subclass of {@link SQLException} thrown when the SQLState class value
+ * is '<i>28</i>', or under vendor-specified conditions. This indicates that
+ * the authorization credentials presented during connection establishment
+ * are not valid.
+ * <p>
+ * Please consult your driver vendor documentation for the vendor-specified
+ * conditions for which this <code>Exception</code> may be thrown.
  * @since 1.6
  */
 public class SQLInvalidAuthorizationSpecException extends SQLNonTransientException {
--- a/src/share/classes/java/sql/SQLNonTransientConnectionException.java	Fri Sep 03 15:00:10 2010 -0700
+++ b/src/share/classes/java/sql/SQLNonTransientConnectionException.java	Sat Sep 04 12:21:56 2010 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,13 @@
 package java.sql;
 
 /**
- * <P> The subclass of {@link SQLException} thrown for the SQLState
- * class value '<i>08</i>', representing
- * that the connection operation that failed will not succeed when
+ * The subclass of {@link SQLException} thrown for the SQLState
+ * class value '<i>08</i>', or under vendor-specified conditions.  This
+ * indicates that the connection operation that failed will not succeed if
  * the operation is retried without the cause of the failure being corrected.
  * <p>
+ * Please consult your driver vendor documentation for the vendor-specified
+ * conditions for which this <code>Exception</code> may be thrown.
  * @since 1.6
  */
 public class SQLNonTransientConnectionException extends java.sql.SQLNonTransientException {
--- a/src/share/classes/java/sql/SQLSyntaxErrorException.java	Fri Sep 03 15:00:10 2010 -0700
+++ b/src/share/classes/java/sql/SQLSyntaxErrorException.java	Sat Sep 04 12:21:56 2010 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,12 @@
 package java.sql;
 
 /**
- * The subclass of {@link SQLException} thrown when the SQLState class value is '<i>42</i>'. This indicates that the
+ * The subclass of {@link SQLException} thrown when the SQLState class value
+ * is '<i>42</i>', or under vendor-specified conditions. This indicates that the
  * in-progress query has violated SQL syntax rules.
- *
+ * <p>
+ * Please consult your driver vendor documentation for the vendor-specified
+ * conditions for which this <code>Exception</code> may be thrown.
  * @since 1.6
  */
 public class SQLSyntaxErrorException extends SQLNonTransientException {
--- a/src/share/classes/java/sql/SQLTransactionRollbackException.java	Fri Sep 03 15:00:10 2010 -0700
+++ b/src/share/classes/java/sql/SQLTransactionRollbackException.java	Sat Sep 04 12:21:56 2010 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,13 @@
 package java.sql;
 
 /**
- * The subclass of {@link SQLException} thrown when the SQLState class value is '<i>40</i>'. This indicates that the
- * current statement was automatically rolled back by the database becuase of deadlock or other
- * transaction serialization failures.
- *
+ * The subclass of {@link SQLException} thrown when the SQLState class value
+ * is '<i>40</i>', or under vendor-specified conditions. This indicates that the
+ * current statement was automatically rolled back by the database because
+ * of deadlock or other transaction serialization failures.
+ * <p>
+ * Please consult your driver vendor documentation for the vendor-specified
+ * conditions for which this <code>Exception</code> may be thrown.
  * @since 1.6
  */
 public class SQLTransactionRollbackException extends SQLTransientException {
--- a/src/share/classes/java/sql/SQLTransientConnectionException.java	Fri Sep 03 15:00:10 2010 -0700
+++ b/src/share/classes/java/sql/SQLTransientConnectionException.java	Sat Sep 04 12:21:56 2010 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,12 @@
 
 /**
  * The subclass of {@link SQLException} for the SQLState class
- * value '<i>08</i>', representing
- * that the connection operation that failed might be able to succeed when
+ * value '<i>08</i>', or under vendor-specified conditions.  This indicates
+ * that the connection operation that failed might be able to succeed if
  * the operation is retried without any application-level changes.
- *<p>
- *
+ * <p>
+ * Please consult your driver vendor documentation for the vendor-specified
+ * conditions for which this <code>Exception</code> may be thrown.
  * @since 1.6
  */
 public class SQLTransientConnectionException extends java.sql.SQLTransientException {