This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push: new 651c9255 Javadoc 651c9255 is described below commit 651c9255db72b0f84aaa75c13287dc3ca3e3fcad Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Aug 12 07:35:37 2024 -0400 Javadoc --- src/main/java/org/apache/commons/dbcp2/BasicDataSource.java | 10 +++++----- src/main/java/org/apache/commons/dbcp2/PoolableConnection.java | 4 ++-- .../org/apache/commons/dbcp2/PoolableConnectionFactory.java | 8 ++++---- src/main/java/org/apache/commons/dbcp2/Utils.java | 4 +++- .../commons/dbcp2/managed/PoolableManagedConnection.java | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java index 45511a3f..95b756bf 100644 --- a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java +++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java @@ -853,7 +853,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * Gets the set of SQL_STATE codes considered to signal fatal conditions. + * Gets the set of SQL State codes considered to signal fatal conditions. * * @return fatal disconnection state codes * @see #setDisconnectionSqlCodes(Collection) @@ -950,7 +950,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean /** * True means that validation will fail immediately for connections that have previously thrown SQLExceptions with - * SQL_STATE indicating fatal disconnection errors. + * SQL State indicating fatal disconnection errors. * * @return true if connections created by this datasource will fast fail validation. * @see #setDisconnectionSqlCodes(Collection) @@ -1945,11 +1945,11 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean } /** - * Sets the SQL_STATE codes considered to signal fatal conditions. + * Sets the SQL State codes considered to signal fatal conditions. * <p> * Overrides the defaults in {@link Utils#getDisconnectionSqlCodes()} (plus anything starting with * {@link Utils#DISCONNECTION_SQL_CODE_PREFIX}). If this property is non-null and {@link #getFastFailValidation()} - * is {@code true}, whenever connections created by this datasource generate exceptions with SQL_STATE codes in this + * is {@code true}, whenever connections created by this datasource generate exceptions with SQL State codes in this * list, they will be marked as "fatally disconnected" and subsequent validations will fail fast (no attempt at * isValid or validation query). * </p> @@ -1962,7 +1962,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * setLoginTimeout, getLoginTimeout, getLogWriter}. * </p> * - * @param disconnectionSqlCodes SQL_STATE codes considered to signal fatal conditions + * @param disconnectionSqlCodes SQL State codes considered to signal fatal conditions * @since 2.1 */ public void setDisconnectionSqlCodes(final Collection<String> disconnectionSqlCodes) { diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java index c99e789a..1497e9e6 100644 --- a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java +++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java @@ -71,7 +71,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme private boolean fatalSqlExceptionThrown; /** - * SQL_STATE codes considered to signal fatal conditions. Overrides the defaults in + * SQL State codes considered to signal fatal conditions. Overrides the defaults in * {@link Utils#getDisconnectionSqlCodes()} (plus anything starting with {@link Utils#DISCONNECTION_SQL_CODE_PREFIX}). */ private final Collection<String> disconnectionSqlCodes; @@ -104,7 +104,7 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme * @param jmxObjectName * JMX name * @param disconnectSqlCodes - * SQL_STATE codes considered fatal disconnection errors + * SQL State codes considered fatal disconnection errors * @param fastFailValidation * true means fatal disconnection errors cause subsequent validations to fail immediately (no attempt to * run query or isValid) diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java index 923032f0..8de3a636 100644 --- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java @@ -271,11 +271,11 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo } /** - * SQL_STATE codes considered to signal fatal conditions. + * SQL State codes considered to signal fatal conditions. * <p> * Overrides the defaults in {@link Utils#getDisconnectionSqlCodes()} (plus anything starting with * {@link Utils#DISCONNECTION_SQL_CODE_PREFIX}). If this property is non-null and {@link #isFastFailValidation()} is - * {@code true}, whenever connections created by this factory generate exceptions with SQL_STATE codes in this list, + * {@code true}, whenever connections created by this factory generate exceptions with SQL State codes in this list, * they will be marked as "fatally disconnected" and subsequent validations will fail fast (no attempt at isValid or * validation query). * </p> @@ -283,7 +283,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo * If {@link #isFastFailValidation()} is {@code false} setting this property has no effect. * </p> * - * @return SQL_STATE codes overriding defaults + * @return SQL State codes overriding defaults * @since 2.1 */ public Collection<String> getDisconnectionSqlCodes() { @@ -391,7 +391,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo /** * True means that validation will fail immediately for connections that have previously thrown SQLExceptions with - * SQL_STATE indicating fatal disconnection errors. + * SQL State indicating fatal disconnection errors. * * @return true if connections created by this factory will fast fail validation. * @see #setDisconnectionSqlCodes(Collection) diff --git a/src/main/java/org/apache/commons/dbcp2/Utils.java b/src/main/java/org/apache/commons/dbcp2/Utils.java index d5c75f8b..fd106d89 100644 --- a/src/main/java/org/apache/commons/dbcp2/Utils.java +++ b/src/main/java/org/apache/commons/dbcp2/Utils.java @@ -49,7 +49,9 @@ public final class Utils { @Deprecated public static final boolean IS_SECURITY_ENABLED = isSecurityEnabled(); - /** Any SQL_STATE starting with this value is considered a fatal disconnect */ + /** + * Any SQL State starting with this value is considered a fatal disconnect. + */ public static final String DISCONNECTION_SQL_CODE_PREFIX = "08"; /** diff --git a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java index 858a0c44..29d0585b 100644 --- a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java +++ b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java @@ -57,7 +57,7 @@ public class PoolableManagedConnection extends PoolableConnection { * @param pool * connection pool * @param disconnectSqlCodes - * SQL_STATE codes considered fatal disconnection errors + * SQL State codes considered fatal disconnection errors * @param fastFailValidation * true means fatal disconnection errors cause subsequent validations to fail immediately (no attempt to * run query or isValid)