diff options
author | lancea <none@none> | 2010-09-04 12:21:56 -0400 |
---|---|---|
committer | lancea <none@none> | 2010-09-04 12:21:56 -0400 |
commit | ed6ee957902bdaa3c93681100247f125b2cb9596 (patch) | |
tree | a8a0fa361a1f44b28663643fb43b8bd86344dce7 /src/share/classes/java/sql | |
parent | 03547b3306593adbb29aad6604db3a2189c528aa (diff) | |
download | jdk8u_jdk-ed6ee957902bdaa3c93681100247f125b2cb9596.tar.gz |
6861385: Updated SQLException subclasses to clarify that they may be thrown for vendor specific conditions
Reviewed-by: alanb
Diffstat (limited to 'src/share/classes/java/sql')
7 files changed, 49 insertions, 29 deletions
diff --git a/src/share/classes/java/sql/SQLDataException.java b/src/share/classes/java/sql/SQLDataException.java index 813b994978..add946bec4 100644 --- a/src/share/classes/java/sql/SQLDataException.java +++ b/src/share/classes/java/sql/SQLDataException.java @@ -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 { diff --git a/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java b/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java index 0c7160d267..6bbef40696 100644 --- a/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java +++ b/src/share/classes/java/sql/SQLIntegrityConstraintViolationException.java @@ -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 { diff --git a/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java b/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java index 34ccfe1330..c1a029be87 100644 --- a/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java +++ b/src/share/classes/java/sql/SQLInvalidAuthorizationSpecException.java @@ -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 { diff --git a/src/share/classes/java/sql/SQLNonTransientConnectionException.java b/src/share/classes/java/sql/SQLNonTransientConnectionException.java index 089f7f439e..9ba550fa3c 100644 --- a/src/share/classes/java/sql/SQLNonTransientConnectionException.java +++ b/src/share/classes/java/sql/SQLNonTransientConnectionException.java @@ -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 { diff --git a/src/share/classes/java/sql/SQLSyntaxErrorException.java b/src/share/classes/java/sql/SQLSyntaxErrorException.java index a1865d93bb..b50de57594 100644 --- a/src/share/classes/java/sql/SQLSyntaxErrorException.java +++ b/src/share/classes/java/sql/SQLSyntaxErrorException.java @@ -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 { diff --git a/src/share/classes/java/sql/SQLTransactionRollbackException.java b/src/share/classes/java/sql/SQLTransactionRollbackException.java index 9e05add35a..38ced61e3e 100644 --- a/src/share/classes/java/sql/SQLTransactionRollbackException.java +++ b/src/share/classes/java/sql/SQLTransactionRollbackException.java @@ -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 { diff --git a/src/share/classes/java/sql/SQLTransientConnectionException.java b/src/share/classes/java/sql/SQLTransientConnectionException.java index 865793c155..3a0e8ea088 100644 --- a/src/share/classes/java/sql/SQLTransientConnectionException.java +++ b/src/share/classes/java/sql/SQLTransientConnectionException.java @@ -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 @@ package java.sql; /** * 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 { |