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 dc2cb636 Fixes some typos, missing or misplaced characters, and
grammar issues (#299)
dc2cb636 is described below
commit dc2cb636ac1c7b7814624419c3d83b72a1a72233
Author: Martin Wiesner <[email protected]>
AuthorDate: Sun Aug 27 00:31:14 2023 +0200
Fixes some typos, missing or misplaced characters, and grammar issues (#299)
---
src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java | 4 ++--
src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java | 2 +-
src/main/java/org/apache/commons/dbcp2/PoolableConnection.java | 2 +-
.../java/org/apache/commons/dbcp2/PoolablePreparedStatement.java | 2 +-
src/main/java/org/apache/commons/dbcp2/PoolingConnection.java | 2 +-
.../java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java | 2 +-
.../apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java | 4 ++--
.../commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java | 2 +-
.../apache/commons/dbcp2/datasources/PerUserPoolDataSource.java | 2 +-
.../apache/commons/dbcp2/managed/LocalXAConnectionFactory.java | 4 ++--
.../java/org/apache/commons/dbcp2/managed/ManagedConnection.java | 8 ++++----
.../org/apache/commons/dbcp2/managed/TransactionRegistry.java | 2 +-
.../org/apache/commons/dbcp2/managed/XAConnectionFactory.java | 4 ++--
13 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index a53d1794..9231246a 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -120,7 +120,7 @@ public class DelegatingConnection<C extends Connection>
extends AbandonedTrace i
}
/**
- * Clears the cached state. Call when you known that the underlying
connection may have been accessed
+ * Clears the cached state. Call when you know that the underlying
connection may have been accessed
* directly.
*/
public void clearCachedState() {
@@ -651,7 +651,7 @@ public class DelegatingConnection<C extends Connection>
extends AbandonedTrace i
protected void passivate() throws SQLException {
// The JDBC specification requires that a Connection close any open
- // Statement's when it is closed.
+ // Statements when it is closed.
// DBCP-288. Not all the traced objects will be statements
final List<AbandonedTrace> traceList = getTrace();
if (!Utils.isEmpty(traceList)) {
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
index 83e5162d..14ab6c7e 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -97,7 +97,7 @@ public final class DelegatingResultSet extends AbandonedTrace
implements ResultS
/**
* Creates a wrapper for the ResultSet which traces this ResultSet to the
Connection which created it (via, for
- * example DatabaseMetadata, and the code which created it.
+ * example DatabaseMetadata), and the code which created it.
* <p>
* Private to ensure all construction is {@link #wrapResultSet(Connection,
ResultSet)}
* </p>
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
index 411f19f2..83148e2a 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
@@ -204,7 +204,7 @@ public class PoolableConnection extends
DelegatingConnection<Connection> impleme
}
/**
- * Expose the {@link #toString()} method via a bean getter so it can be
read as a property via JMX.
+ * Expose the {@link #toString()} method via a bean getter, so it can be
read as a property via JMX.
*/
@Override
public String getToString() {
diff --git
a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
index fd11d7d6..920fc367 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
@@ -54,7 +54,7 @@ public class PoolablePreparedStatement<K> extends
DelegatingPreparedStatement {
* @param stmt
* my underlying {@link PreparedStatement}
* @param key
- * my key" as used by {@link KeyedObjectPool}
+ * my key as used by {@link KeyedObjectPool}
* @param pool
* the {@link KeyedObjectPool} from which I was obtained.
* @param conn
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
index 2a071e30..0000e6c1 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
@@ -602,7 +602,7 @@ public class PoolingConnection extends
DelegatingConnection<Connection>
}
/**
- * {@link KeyedPooledObjectFactory} method for validating pooled
statements. Currently always returns true.
+ * {@link KeyedPooledObjectFactory} method for validating pooled
statements. Currently, always returns true.
*
* @param key
* ignored
diff --git
a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
index 22f1b523..83c03a45 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
@@ -126,7 +126,7 @@ final class ConnectionImpl extends
DelegatingConnection<Connection> {
* be returned, otherwise delegate to the wrapped JDBC 1.x {@link
java.sql.Connection}.
*
* @param sql
- * an SQL statement that may contain one or more '?' parameter
placeholders. Typically this statement is
+ * an SQL statement that may contain one or more '?' parameter
placeholders. Typically, this statement is
* specified using JDBC call escape syntax.
* @return a default {@code CallableStatement} object containing the
pre-compiled SQL statement.
* @throws SQLException
diff --git
a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java
b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java
index 2860f363..4a50e3af 100644
---
a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java
+++
b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java
@@ -437,7 +437,7 @@ final class PooledConnectionImpl
}
/**
- * My {@link KeyedPooledObjectFactory} method for passivating {@link
PreparedStatement}s. Currently invokes
+ * My {@link KeyedPooledObjectFactory} method for passivating {@link
PreparedStatement}s. Currently, invokes
* {@link PreparedStatement#clearParameters}.
*
* @param key
@@ -458,7 +458,7 @@ final class PooledConnectionImpl
* Creates or obtains a {@link CallableStatement} from my pool.
*
* @param sql
- * an SQL statement that may contain one or more '?' parameter
placeholders. Typically this statement is
+ * an SQL statement that may contain one or more '?' parameter
placeholders. Typically, this statement is
* specified using JDBC call escape syntax.
* @return a default {@code CallableStatement} object containing the
pre-compiled SQL statement.
* @throws SQLException
diff --git
a/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
b/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
index ff39d35a..3b21c653 100644
---
a/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
+++
b/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
@@ -205,7 +205,7 @@ final class KeyedCPDSConnectionFactory implements
KeyedPooledObjectFactory<UserP
/**
* Invalidates the PooledConnection in the pool. The
KeyedCPDSConnectionFactory closes the connection and pool
* counters are updated appropriately. Also clears any idle instances
associated with the user name that was used to
- * create the PooledConnection. Connections associated with this user are
not affected and they will not be
+ * create the PooledConnection. Connections associated with this user are
not affected, and they will not be
* automatically closed on return to the pool.
*/
@Override
diff --git
a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
index 36449375..63de955f 100644
---
a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
+++
b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
@@ -63,7 +63,7 @@ public class PerUserPoolDataSource extends
InstanceKeyDataSource {
private static final Log log =
LogFactory.getLog(PerUserPoolDataSource.class);
private static <K, V> HashMap<K, V> createMap() {
- // Should there be a default size different than what this ctor
provides?
+ // Should there be a default size different from what this ctor
provides?
return new HashMap<>();
}
diff --git
a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
index 8e7aa6fc..ecda3e76 100644
---
a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
+++
b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
@@ -265,7 +265,7 @@ public class LocalXAConnectionFactory implements
XAConnectionFactory {
}
/**
- * Signals that a the connection has been enrolled in a transaction.
This method saves off the current auto
+ * Signals that a connection has been enrolled in a transaction. This
method saves off the current auto
* commit flag, and then disables auto commit. The original auto
commit setting is restored when the transaction
* completes.
*
@@ -287,7 +287,7 @@ public class LocalXAConnectionFactory implements
XAConnectionFactory {
throw new XAException("Already enlisted in another
transaction with xid " + xid);
}
- // save off the current auto commit flag so it can be restored
after the transaction completes
+ // save off the current auto commit flag, so it can be
restored after the transaction completes
try {
originalAutoCommit = connection.getAutoCommit();
} catch (final SQLException ignored) {
diff --git
a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
index adf84f0a..126a39d2 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
@@ -30,7 +30,7 @@ import org.apache.commons.pool2.ObjectPool;
* transaction or JTA Transaction) is in progress. When a global transaction
is active a single physical connection to
* the database is used by all ManagedConnections accessed in the scope of the
transaction. Connection sharing means
* that all data access during a transaction has a consistent view of the
database. When the global transaction is
- * committed or rolled back the enlisted connections are committed or rolled
back. Typically upon transaction
+ * committed or rolled back the enlisted connections are committed or rolled
back. Typically, upon transaction
* completion, a connection returns to the auto commit setting in effect
before being enlisted in the transaction, but
* some vendors do not properly implement this.
* <p>
@@ -236,7 +236,7 @@ public class ManagedConnection<C extends Connection>
extends DelegatingConnectio
}
private void updateTransactionStatus() throws SQLException {
- // if there is a is an active transaction context, assure the
transaction context hasn't changed
+ // if there is an active transaction context, assure the transaction
context hasn't changed
if (transactionContext != null &&
!transactionContext.isTransactionComplete()) {
if (transactionContext.isActive()) {
if (transactionContext !=
transactionRegistry.getActiveTransactionContext()) {
@@ -253,7 +253,7 @@ public class ManagedConnection<C extends Connection>
extends DelegatingConnectio
// the existing transaction context ended (or we didn't have one), get
the active transaction context
transactionContext = transactionRegistry.getActiveTransactionContext();
- // if there is an active transaction context and it already has a
shared connection, use it
+ // if there is an active transaction context, and it already has a
shared connection, use it
if (transactionContext != null &&
transactionContext.getSharedConnection() != null) {
// A connection for the connection factory has already been
enrolled
// in the transaction, replace our delegate with the enrolled
connection
@@ -285,7 +285,7 @@ public class ManagedConnection<C extends Connection>
extends DelegatingConnectio
final C shared = (C) transactionContext.getSharedConnection();
setDelegate(shared);
- // remember that we are using a shared connection so it can be
cleared after the
+ // remember that we are using a shared connection, so it can be
cleared after the
// transaction completes
isSharedConnection = true;
} else {
diff --git
a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
index 9d526ce2..203d0435 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
@@ -84,7 +84,7 @@ public class TransactionRegistry {
return null;
}
- // This is the transaction on the thread so no need to check it's
status - we should try to use it and
+ // This is the transaction on the thread so no need to check its
status - we should try to use it and
// fail later based on the subsequent status
} catch (final SystemException e) {
throw new SQLException("Unable to determine current transaction ",
e);
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 f3fd6be2..3421fda8 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
@@ -25,7 +25,7 @@ import org.apache.commons.dbcp2.ConnectionFactory;
* XAConnectionFactory is an extension of ConnectionFactory used to create
connections in a transaction managed
* environment. The XAConnectionFactory operates like a normal
ConnectionFactory except a TransactionRegistry is
* provided from which the XAResource for a connection can be obtained. This
allows the existing DBCP pool code to work
- * with XAConnections and gives a the ManagedConnection a way to enlist a
connection in the transaction.
+ * with XAConnections and gives the ManagedConnection a way to enlist a
connection in the transaction.
*
* @since 2.0
*/
@@ -45,7 +45,7 @@ public interface XAConnectionFactory extends
ConnectionFactory {
Connection createConnection() throws SQLException;
/**
- * Gets the TransactionRegistry for this connection factory which contains
a the XAResource for every connection
+ * Gets the TransactionRegistry for this connection factory which contains
the XAResource for every connection
* created by this factory.
*
* @return the transaction registry for this connection factory