# HG changeset patch # User lancea # Date 1283617316 14400 # Node ID 06df0b8bf209872ced9239e7ef09cb356ae72bc3 # Parent 352bf578a6ddc7f7e97ee94302ea738ed6264844 6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions Reviewed-by: alanb diff -r 352bf578a6dd -r 06df0b8bf209 jdk/src/share/classes/java/sql/SQLDataException.java --- a/jdk/src/share/classes/java/sql/SQLDataException.java Fri Sep 03 15:00:10 2010 -0700 +++ b/jdk/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 '22'. 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 '22', 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. + *

+ * Please consult your driver vendor documentation for the vendor-specified + * conditions for which this Exception may be thrown. * @since 1.6 */ public class SQLDataException extends SQLNonTransientException { diff -r 352bf578a6dd -r 06df0b8bf209 jdk/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java --- a/jdk/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java Fri Sep 03 15:00:10 2010 -0700 +++ b/jdk/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 '23'. This indicates that an integrity + * The subclass of {@link SQLException} thrown when the SQLState class value + * is '23', or under vendor-specified conditions. + * This indicates that an integrity * constraint (foreign key, primary key or unique key) has been violated. - * + *

+ * Please consult your driver vendor documentation for the vendor-specified + * conditions for which this Exception may be thrown. * @since 1.6 */ public class SQLIntegrityConstraintViolationException extends SQLNonTransientException { diff -r 352bf578a6dd -r 06df0b8bf209 jdk/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java --- a/jdk/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java Fri Sep 03 15:00:10 2010 -0700 +++ b/jdk/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 '28'. 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 '28', or under vendor-specified conditions. This indicates that + * the authorization credentials presented during connection establishment + * are not valid. + *

+ * Please consult your driver vendor documentation for the vendor-specified + * conditions for which this Exception may be thrown. * @since 1.6 */ public class SQLInvalidAuthorizationSpecException extends SQLNonTransientException { diff -r 352bf578a6dd -r 06df0b8bf209 jdk/src/share/classes/java/sql/SQLNonTransientConnectionException.java --- a/jdk/src/share/classes/java/sql/SQLNonTransientConnectionException.java Fri Sep 03 15:00:10 2010 -0700 +++ b/jdk/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; /** - *

The subclass of {@link SQLException} thrown for the SQLState - * class value '08', representing - * that the connection operation that failed will not succeed when + * The subclass of {@link SQLException} thrown for the SQLState + * class value '08', 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. *

+ * Please consult your driver vendor documentation for the vendor-specified + * conditions for which this Exception may be thrown. * @since 1.6 */ public class SQLNonTransientConnectionException extends java.sql.SQLNonTransientException { diff -r 352bf578a6dd -r 06df0b8bf209 jdk/src/share/classes/java/sql/SQLSyntaxErrorException.java --- a/jdk/src/share/classes/java/sql/SQLSyntaxErrorException.java Fri Sep 03 15:00:10 2010 -0700 +++ b/jdk/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 '42'. This indicates that the + * The subclass of {@link SQLException} thrown when the SQLState class value + * is '42', or under vendor-specified conditions. This indicates that the * in-progress query has violated SQL syntax rules. - * + *

+ * Please consult your driver vendor documentation for the vendor-specified + * conditions for which this Exception may be thrown. * @since 1.6 */ public class SQLSyntaxErrorException extends SQLNonTransientException { diff -r 352bf578a6dd -r 06df0b8bf209 jdk/src/share/classes/java/sql/SQLTransactionRollbackException.java --- a/jdk/src/share/classes/java/sql/SQLTransactionRollbackException.java Fri Sep 03 15:00:10 2010 -0700 +++ b/jdk/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 '40'. 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 '40', 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. + *

+ * Please consult your driver vendor documentation for the vendor-specified + * conditions for which this Exception may be thrown. * @since 1.6 */ public class SQLTransactionRollbackException extends SQLTransientException { diff -r 352bf578a6dd -r 06df0b8bf209 jdk/src/share/classes/java/sql/SQLTransientConnectionException.java --- a/jdk/src/share/classes/java/sql/SQLTransientConnectionException.java Fri Sep 03 15:00:10 2010 -0700 +++ b/jdk/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 '08', representing - * that the connection operation that failed might be able to succeed when + * value '08', 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. - *

- * + *

+ * Please consult your driver vendor documentation for the vendor-specified + * conditions for which this Exception may be thrown. * @since 1.6 */ public class SQLTransientConnectionException extends java.sql.SQLTransientException {