This is an automated email from the ASF dual-hosted git repository.

garydgregory 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 70e2548a Javadoc
70e2548a is described below

commit 70e2548ade44896f57cb059ca16f4b55c34212ad
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Aug 2 15:36:06 2026 -0400

    Javadoc
---
 .../java/org/apache/commons/dbcp2/BasicDataSource.java | 18 +++++++++---------
 .../org/apache/commons/dbcp2/DataSourceMXBean.java     |  4 ++--
 .../org/apache/commons/dbcp2/DelegatingConnection.java |  2 +-
 .../commons/dbcp2/PoolableConnectionFactory.java       |  4 ++--
 .../dbcp2/datasources/InstanceKeyDataSource.java       |  2 +-
 .../commons/dbcp2/managed/XAConnectionFactory.java     |  2 +-
 .../org/apache/commons/dbcp2/TestBasicDataSource.java  |  2 +-
 src/test/java/org/apache/commons/dbcp2/TestJndi.java   |  6 +++---
 8 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java 
b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
index 8473258f..70ab5d0f 100644
--- a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
@@ -425,7 +425,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * exceptions.
      * </p>
      *
-     * @throws SQLException if an error occurs closing idle connections
+     * @throws SQLException Thrown if an error occurs closing idle connections
      */
     @Override
     public synchronized void close() throws SQLException {
@@ -524,7 +524,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * Creates (if necessary) and return the internal data source we are using 
to manage our connections.
      *
      * @return The current internal DataSource or a newly created instance if 
it has not yet been created.
-     * @throws SQLException if the object pool cannot be created.
+     * @throws SQLException Thrown if the object pool cannot be created.
      */
     protected synchronized DataSource createDataSource() throws SQLException {
         if (closed) {
@@ -577,7 +577,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * Creates the actual data source instance. This method only exists so 
that subclasses can replace the
      * implementation class.
      *
-     * @throws SQLException if unable to create a datasource instance
+     * @throws SQLException Thrown if unable to create a datasource instance
      * @return A new DataSource instance
      */
     protected DataSource createDataSourceInstance() throws SQLException {
@@ -611,7 +611,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * subclasses can replace the default implementation.
      *
      * @param driverConnectionFactory JDBC connection factory
-     * @throws SQLException if an error occurs creating the 
PoolableConnectionFactory
+     * @throws SQLException Thrown if an error occurs creating the 
PoolableConnectionFactory
      * @return A new PoolableConnectionFactory configured with the current 
configuration of this BasicDataSource
      */
     protected PoolableConnectionFactory createPoolableConnectionFactory(final 
ConnectionFactory driverConnectionFactory)
@@ -707,7 +707,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
     /**
      * Creates (if necessary) and return a connection to the database.
      *
-     * @throws SQLException if a database access error occurs
+     * @throws SQLException Thrown if a database access error occurs
      * @return A database connection
      */
     @Override
@@ -1083,7 +1083,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * Calls {@link #createDataSource()}, so has the side effect of 
initializing the connection pool.
      * </p>
      *
-     * @throws SQLException if a database access error occurs
+     * @throws SQLException Thrown if a database access error occurs
      * @return log writer in use
      */
     @Override
@@ -1725,7 +1725,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * <p>
      * The new connection pool created by this method is initialized with 
currently set configuration properties.
      *
-     * @throws SQLException if an error occurs initializing the datasource
+     * @throws SQLException Thrown if an error occurs initializing the 
datasource
      */
     @Override
     public synchronized void restart() throws SQLException {
@@ -2219,7 +2219,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * </p>
      *
      * @param logWriter The new log writer
-     * @throws SQLException if a database access error occurs
+     * @throws SQLException Thrown if a database access error occurs
      */
     @Override
     public void setLogWriter(final PrintWriter logWriter) throws SQLException {
@@ -2649,7 +2649,7 @@ public class BasicDataSource implements DataSource, 
BasicDataSourceMXBean, MBean
      * return 0.  These connections will be physically closed when they are 
returned, but they will not count against
      * the maximum allowed in the newly started datasource.
      *
-     * @throws SQLException if an error occurs initializing the datasource
+     * @throws SQLException Thrown if an error occurs initializing the 
datasource
      */
     @Override
     public synchronized void start() throws SQLException {
diff --git a/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java 
b/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java
index 89ae0307..a4e2d36f 100644
--- a/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java
+++ b/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java
@@ -347,7 +347,7 @@ public interface DataSourceMXBean {
     /**
      * See {@link BasicDataSource#restart()}
      *
-     * @throws SQLException if an error occurs initializing the data source.
+     * @throws SQLException Thrown if an error occurs initializing the data 
source.
      * @since 2.8.0
      */
     default void restart() throws SQLException {
@@ -357,7 +357,7 @@ public interface DataSourceMXBean {
     /**
      * See {@link BasicDataSource#start()}
      *
-     * @throws SQLException if an error occurs initializing the data source.
+     * @throws SQLException Thrown if an error occurs initializing the data 
source.
      * @since 2.8.0
      */
     default void start() throws SQLException {
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java 
b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index 1b3d0031..af1a6128 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -566,7 +566,7 @@ public class DelegatingConnection<C extends Connection> 
extends AbandonedTrace i
      * @param <T> The DelegatingStatement type.
      * @param delegatingStatement The DelegatingStatement to initialize.
      * @return The given DelegatingStatement.
-     * @throws SQLException if a database access error occurs, this method is 
called on a closed Statement.
+     * @throws SQLException Thrown if a database access error occurs, this 
method is called on a closed Statement.
      */
     private <T extends DelegatingStatement> T init(final T 
delegatingStatement) throws SQLException {
         if (defaultQueryTimeoutDuration != null && 
defaultQueryTimeoutDuration.getSeconds() != 
delegatingStatement.getQueryTimeout()) {
diff --git 
a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java 
b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
index 00d203cc..d1d06a00 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
@@ -412,7 +412,7 @@ public class PoolableConnectionFactory implements 
PooledObjectFactory<PoolableCo
      * Initializes the given connection with the collection of SQL statements 
set in {@link #setConnectionInitSql(Collection)}.
      *
      * @param conn The connection to initialize.
-     * @throws SQLException if a database access error occurs or this method 
is called on a closed connection.
+     * @throws SQLException Thrown if a database access error occurs or this 
method is called on a closed connection.
      * @see #setConnectionInitSql(Collection)
      */
     protected void initializeConnection(final Connection conn) throws 
SQLException {
@@ -842,7 +842,7 @@ public class PoolableConnectionFactory implements 
PooledObjectFactory<PoolableCo
      * Validates the given connection if it is open.
      *
      * @param conn The connection to validate.
-     * @throws SQLException if the connection is closed or validate fails.
+     * @throws SQLException Thrown if the connection is closed or validate 
fails.
      */
     public void validateConnection(final PoolableConnection conn) throws 
SQLException {
         if (conn.isClosed()) {
diff --git 
a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java 
b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
index f166ff81..ad6925bf 100644
--- 
a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
+++ 
b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
@@ -1204,7 +1204,7 @@ public abstract class InstanceKeyDataSource implements 
DataSource, Referenceable
      *
      * @param connection The target connection.
      * @param userName   The user name for the connection.
-     * @throws SQLException if a database access error occurs or this method 
is called on a closed connection
+     * @throws SQLException Thrown if a database access error occurs or this 
method is called on a closed connection
      */
     protected abstract void setupDefaults(Connection connection, String 
userName) throws SQLException;
 
diff --git 
a/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java 
b/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
index 50ef681e..5923468b 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
@@ -39,7 +39,7 @@ public interface XAConnectionFactory extends 
ConnectionFactory {
      * </p>
      *
      * @return A new {@link Connection}
-     * @throws SQLException if a database error occurs creating the connection
+     * @throws SQLException Thrown if a database error occurs creating the 
connection
      */
     @Override
     Connection createConnection() throws SQLException;
diff --git a/src/test/java/org/apache/commons/dbcp2/TestBasicDataSource.java 
b/src/test/java/org/apache/commons/dbcp2/TestBasicDataSource.java
index 7ae00a5b..e181e2de 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestBasicDataSource.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestBasicDataSource.java
@@ -66,7 +66,7 @@ public class TestBasicDataSource extends TestConnectionPool {
      * Cycle through idle connections and verify that they are all valid.
      * Assumes we are the only client of the pool.
      *
-     * @throws Exception if an error occurs
+     * @throws Exception Thrown if an error occurs
      */
     private void checkIdleValid() throws Exception {
         final Set<Connection> idleConnections = new HashSet<>(); // idle 
connections
diff --git a/src/test/java/org/apache/commons/dbcp2/TestJndi.java 
b/src/test/java/org/apache/commons/dbcp2/TestJndi.java
index 39ab2c9c..7a33c134 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestJndi.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestJndi.java
@@ -55,7 +55,7 @@ public class TestJndi {
     /**
      * Binds a DataSource into JNDI.
      *
-     * @throws Exception if creation or binding fails.
+     * @throws Exception Thrown if creation or binding fails.
      */
     protected void bindDataSource(final DataSource dataSource) throws 
Exception {
         context.bind(JNDI_PATH, dataSource);
@@ -65,7 +65,7 @@ public class TestJndi {
      * Binds a DataSource to the JNDI and checks that we have successfully
      * bound it by looking it up again.
      *
-     * @throws Exception if the bind, lookup or connect fails
+     * @throws Exception Thrown if the bind, lookup or connect fails
      */
     protected void checkBind(final DataSource dataSource) throws Exception {
         bindDataSource(dataSource);
@@ -89,7 +89,7 @@ public class TestJndi {
     /**
      * Retrieves a DataSource from JNDI.
      *
-     * @throws Exception if the JNDI lookup fails or no DataSource is bound.
+     * @throws Exception Thrown if the JNDI lookup fails or no DataSource is 
bound.
      */
     protected DataSource retrieveDataSource() throws Exception {
         final Context ctx = getInitialContext();

Reply via email to