Repository: commons-dbcp Updated Branches: refs/heads/master b7a12cfcf -> b68e9f59c
Longer lines for Javadocs. Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/b68e9f59 Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/b68e9f59 Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/b68e9f59 Branch: refs/heads/master Commit: b68e9f59ce4516dca88ed66d7cd6642b4187b074 Parents: b7a12cf Author: Gary Gregory <garydgreg...@gmail.com> Authored: Sun Jun 10 09:20:11 2018 -0600 Committer: Gary Gregory <garydgreg...@gmail.com> Committed: Sun Jun 10 09:20:11 2018 -0600 ---------------------------------------------------------------------- .../dbcp2/cpdsadapter/ConnectionImpl.java | 54 +++--- .../dbcp2/cpdsadapter/DriverAdapterCPDS.java | 192 +++++++++++-------- .../commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java | 1 + .../dbcp2/cpdsadapter/PooledConnectionImpl.java | 113 ++++++----- 4 files changed, 200 insertions(+), 160 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/b68e9f59/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java ---------------------------------------------------------------------- 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 adcc8ef..951c4ff 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java @@ -27,17 +27,14 @@ import org.apache.commons.dbcp2.DelegatingConnection; import org.apache.commons.dbcp2.DelegatingPreparedStatement; /** - * This class is the <code>Connection</code> that will be returned - * from <code>PooledConnectionImpl.getConnection()</code>. - * Most methods are wrappers around the JDBC 1.x <code>Connection</code>. - * A few exceptions include preparedStatement and close. - * In accordance with the JDBC specification this Connection cannot - * be used after closed() is called. Any further usage will result in an + * This class is the <code>Connection</code> that will be returned from + * <code>PooledConnectionImpl.getConnection()</code>. Most methods are wrappers around the JDBC 1.x + * <code>Connection</code>. A few exceptions include preparedStatement and close. In accordance with the JDBC + * specification this Connection cannot be used after closed() is called. Any further usage will result in an * SQLException. - * - * ConnectionImpl extends DelegatingConnection to enable access to the - * underlying connection. - * + * <p> + * ConnectionImpl extends DelegatingConnection to enable access to the underlying connection. + * </p> * @author John D. McNally * @since 2.0 */ @@ -65,13 +62,14 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * Marks the Connection as closed, and notifies the pool that the - * pooled connection is available. - * In accordance with the JDBC specification this Connection cannot - * be used after closed() is called. Any further usage will result in an - * SQLException. + * Marks the Connection as closed, and notifies the pool that the pooled connection is available. + * <p> + * In accordance with the JDBC specification this Connection cannot be used after closed() is called. Any further + * usage will result in an SQLException. + * </p> * - * @throws SQLException The database connection couldn't be closed. + * @throws SQLException + * The database connection couldn't be closed. */ @Override public void close() throws SQLException { @@ -177,14 +175,14 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * If pooling of <code>PreparedStatement</code>s is turned on in the - * {@link DriverAdapterCPDS}, a pooled object may be returned, otherwise - * delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. + * If pooling of <code>PreparedStatement</code>s is turned on in the {@link DriverAdapterCPDS}, a pooled object may + * be returned, otherwise delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. * - * @param sql SQL statement to be prepared + * @param sql + * SQL statement to be prepared * @return the prepared statement - * @throws SQLException if this connection is closed or an error occurs - * in the wrapped connection. + * @throws SQLException + * if this connection is closed or an error occurs in the wrapped connection. */ @Override public PreparedStatement prepareStatement(final String sql) throws SQLException { @@ -200,12 +198,11 @@ class ConnectionImpl extends DelegatingConnection<Connection> { } /** - * If pooling of <code>PreparedStatement</code>s is turned on in the - * {@link DriverAdapterCPDS}, a pooled object may be returned, otherwise - * delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. + * If pooling of <code>PreparedStatement</code>s is turned on in the {@link DriverAdapterCPDS}, a pooled object may + * be returned, otherwise delegate to the wrapped JDBC 1.x {@link java.sql.Connection}. * - * @throws SQLException if this connection is closed or an error occurs - * in the wrapped connection. + * @throws SQLException + * if this connection is closed or an error occurs in the wrapped connection. */ @Override public PreparedStatement prepareStatement(final String sql, final int resultSetType, @@ -288,6 +285,7 @@ class ConnectionImpl extends DelegatingConnection<Connection> { /** * If false, getDelegate() and getInnermostDelegate() will return null. + * * @return true if access is allowed to the underlying connection * @see ConnectionImpl */ @@ -297,6 +295,7 @@ class ConnectionImpl extends DelegatingConnection<Connection> { /** * Get the delegated connection, if allowed. + * * @return the internal connection, or null if access is not allowed. * @see #isAccessToUnderlyingConnectionAllowed() */ @@ -310,6 +309,7 @@ class ConnectionImpl extends DelegatingConnection<Connection> { /** * Get the innermost connection, if allowed. + * * @return the innermost internal connection, or null if access is not allowed. * @see #isAccessToUnderlyingConnectionAllowed() */ http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/b68e9f59/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java index e16d45c..fecf443 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java @@ -156,8 +156,7 @@ public class DriverAdapterCPDS } /** - * Attempt to establish a database connection using the default - * user and password. + * Attempts to establish a database connection using the default user and password. */ @Override public PooledConnection getPooledConnection() throws SQLException { @@ -166,8 +165,11 @@ public class DriverAdapterCPDS /** * Attempt to establish a database connection. - * @param username name to be used for the connection - * @param pass password to be used fur the connection + * + * @param username + * name to be used for the connection + * @param pass + * password to be used fur the connection */ @Override public PooledConnection getPooledConnection(final String username, final String pass) @@ -355,8 +357,7 @@ public class DriverAdapterCPDS } /** - * Throws an IllegalStateException, if a PooledConnection has already - * been requested. + * Throws an IllegalStateException, if a PooledConnection has already been requested. */ private void assertInitializationAllowed() throws IllegalStateException { if (getConnectionCalled) { @@ -377,19 +378,23 @@ public class DriverAdapterCPDS } /** - * <p>Sets the connection properties passed to the JDBC driver.</p> + * <p> + * Sets the connection properties passed to the JDBC driver. + * </p> * - * <p>If <code>props</code> contains "user" and/or "password" - * properties, the corresponding instance properties are set. If these - * properties are not present, they are filled in using - * {@link #getUser()}, {@link #getPassword()} when {@link #getPooledConnection()} - * is called, or using the actual parameters to the method call when - * {@link #getPooledConnection(String, String)} is called. Calls to - * {@link #setUser(String)} or {@link #setPassword(String)} overwrite the values - * of these properties if <code>connectionProperties</code> is not null.</p> + * <p> + * If <code>props</code> contains "user" and/or "password" properties, the corresponding instance properties are + * set. If these properties are not present, they are filled in using {@link #getUser()}, {@link #getPassword()} + * when {@link #getPooledConnection()} is called, or using the actual parameters to the method call when + * {@link #getPooledConnection(String, String)} is called. Calls to {@link #setUser(String)} or + * {@link #setPassword(String)} overwrite the values of these properties if <code>connectionProperties</code> is not + * null. + * </p> * - * @param props Connection properties to use when creating new connections. - * @throws IllegalStateException if {@link #getPooledConnection()} has been called + * @param props + * Connection properties to use when creating new connections. + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called */ public void setConnectionProperties(final Properties props) { assertInitializationAllowed(); @@ -405,9 +410,8 @@ public class DriverAdapterCPDS } /** - * Gets the value of description. This property is here for use by - * the code which will deploy this datasource. It is not used - * internally. + * Gets the value of description. This property is here for use by the code which will deploy this datasource. It is + * not used internally. * * @return value of description, may be null. * @see #setDescription(String) @@ -417,11 +421,11 @@ public class DriverAdapterCPDS } /** - * Sets the value of description. This property is here for use by - * the code which will deploy this datasource. It is not used - * internally. + * Sets the value of description. This property is here for use by the code which will deploy this datasource. It is + * not used internally. * - * @param v Value to assign to description. + * @param v + * Value to assign to description. */ public void setDescription(final String v) { this.description = v; @@ -429,6 +433,7 @@ public class DriverAdapterCPDS /** * Gets the value of password for the default user. + * * @return value of password. */ public String getPassword() { @@ -437,8 +442,11 @@ public class DriverAdapterCPDS /** * Sets the value of password for the default user. - * @param v Value to assign to password. - * @throws IllegalStateException if {@link #getPooledConnection()} has been called + * + * @param v + * Value to assign to password. + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called */ public void setPassword(final String v) { assertInitializationAllowed(); @@ -448,6 +456,7 @@ public class DriverAdapterCPDS /** * Gets the value of url used to locate the database for this datasource. + * * @return value of url. */ public String getUrl() { @@ -456,9 +465,12 @@ public class DriverAdapterCPDS /** * Sets the value of URL string used to locate the database for this datasource. - * @param v Value to assign to url. - * @throws IllegalStateException if {@link #getPooledConnection()} has been called - */ + * + * @param v + * Value to assign to url. + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called + */ public void setUrl(final String v) { assertInitializationAllowed(); this.url = v; @@ -466,6 +478,7 @@ public class DriverAdapterCPDS /** * Gets the value of default user (login or username). + * * @return value of user. */ public String getUser() { @@ -474,8 +487,11 @@ public class DriverAdapterCPDS /** * Sets the value of default user (login or username). - * @param v Value to assign to user. - * @throws IllegalStateException if {@link #getPooledConnection()} has been called + * + * @param v + * Value to assign to user. + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called */ public void setUser(final String v) { assertInitializationAllowed(); @@ -484,7 +500,8 @@ public class DriverAdapterCPDS } /** - * Gets the driver classname. + * Gets the driver class name. + * * @return value of driver. */ public String getDriver() { @@ -492,11 +509,15 @@ public class DriverAdapterCPDS } /** - * Sets the driver classname. Setting the driver classname cause the - * driver to be registered with the DriverManager. - * @param v Value to assign to driver. - * @throws IllegalStateException if {@link #getPooledConnection()} has been called - * @throws ClassNotFoundException if the class cannot be located + * Sets the driver class name. Setting the driver class name cause the driver to be registered with the + * DriverManager. + * + * @param v + * Value to assign to driver. + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called + * @throws ClassNotFoundException + * if the class cannot be located */ public void setDriver(final String v) throws ClassNotFoundException { assertInitializationAllowed(); @@ -506,8 +527,8 @@ public class DriverAdapterCPDS } /** - * Gets the maximum time in seconds that this data source can wait - * while attempting to connect to a database. NOT USED. + * Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. NOT + * USED. */ @Override public int getLoginTimeout() { @@ -523,8 +544,8 @@ public class DriverAdapterCPDS } /** - * Sets the maximum time in seconds that this data source will wait - * while attempting to connect to a database. NOT USED. + * Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. NOT + * USED. */ @Override public void setLoginTimeout(final int seconds) { @@ -546,6 +567,7 @@ public class DriverAdapterCPDS /** * Flag to toggle the pooling of <code>PreparedStatement</code>s + * * @return value of poolPreparedStatements. */ public boolean isPoolPreparedStatements() { @@ -554,8 +576,11 @@ public class DriverAdapterCPDS /** * Flag to toggle the pooling of <code>PreparedStatement</code>s - * @param v true to pool statements. - * @throws IllegalStateException if {@link #getPooledConnection()} has been called + * + * @param v + * true to pool statements. + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called */ public void setPoolPreparedStatements(final boolean v) { assertInitializationAllowed(); @@ -563,8 +588,9 @@ public class DriverAdapterCPDS } /** - * Gets the maximum number of statements that can remain idle in the - * pool, without extra ones being released, or negative for no limit. + * Gets the maximum number of statements that can remain idle in the pool, without extra ones being released, or + * negative for no limit. + * * @return the value of maxIdle */ public int getMaxIdle() { @@ -572,11 +598,13 @@ public class DriverAdapterCPDS } /** - * Gets the maximum number of statements that can remain idle in the - * pool, without extra ones being released, or negative for no limit. + * Gets the maximum number of statements that can remain idle in the pool, without extra ones being released, or + * negative for no limit. * - * @param maxIdle The maximum number of statements that can remain idle - * @throws IllegalStateException if {@link #getPooledConnection()} has been called + * @param maxIdle + * The maximum number of statements that can remain idle + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called */ public void setMaxIdle(final int maxIdle) { assertInitializationAllowed(); @@ -584,10 +612,9 @@ public class DriverAdapterCPDS } /** - * Gets the number of milliseconds to sleep between runs of the - * idle object evictor thread. - * When non-positive, no idle object evictor thread will be - * run. + * Gets the number of milliseconds to sleep between runs of the idle object evictor thread. When non-positive, no + * idle object evictor thread will be run. + * * @return the value of the evictor thread timer * @see #setTimeBetweenEvictionRunsMillis(long) */ @@ -613,11 +640,10 @@ public class DriverAdapterCPDS } /** - * Gets the number of statements to examine during each run of the - * idle object evictor thread (if any.) + * Gets the number of statements to examine during each run of the idle object evictor thread (if any.) * - * *see #setNumTestsPerEvictionRun - * *see #setTimeBetweenEvictionRunsMillis + * @see #setNumTestsPerEvictionRun + * @see #setTimeBetweenEvictionRunsMillis * @return the number of statements to examine during each run of the idle object evictor thread (if any.) */ public int getNumTestsPerEvictionRun() { @@ -625,17 +651,19 @@ public class DriverAdapterCPDS } /** - * Sets the number of statements to examine during each run of the - * idle object evictor thread (if any). + * Sets the number of statements to examine during each run of the idle object evictor thread (if any). * <p> - * When a negative value is supplied, <tt>ceil({*link #numIdle})/abs({*link #getNumTestsPerEvictionRun})</tt> - * tests will be run. I.e., when the value is <i>-n</i>, roughly one <i>n</i>th of the - * idle objects will be tested per run. + * When a negative value is supplied, <tt>ceil({*link #numIdle})/abs({*link #getNumTestsPerEvictionRun})</tt> tests + * will be run. I.e., when the value is <i>-n</i>, roughly one <i>n</i>th of the idle objects will be tested per + * run. + * </p> * - * @param numTestsPerEvictionRun number of statements to examine per run + * @param numTestsPerEvictionRun + * number of statements to examine per run * @see #getNumTestsPerEvictionRun() * @see #setTimeBetweenEvictionRunsMillis(long) - * @throws IllegalStateException if {@link #getPooledConnection()} has been called + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called */ public void setNumTestsPerEvictionRun(final int numTestsPerEvictionRun) { assertInitializationAllowed(); @@ -643,12 +671,11 @@ public class DriverAdapterCPDS } /** - * Gets the minimum amount of time a statement may sit idle in the pool - * before it is eligible for eviction by the idle object evictor - * (if any). + * Gets the minimum amount of time a statement may sit idle in the pool before it is eligible for eviction by the + * idle object evictor (if any). * - * *see #setMinEvictableIdleTimeMillis - * *see #setTimeBetweenEvictionRunsMillis + * @see #setMinEvictableIdleTimeMillis + * @see #setTimeBetweenEvictionRunsMillis * @return the minimum amount of time a statement may sit idle in the pool. */ public int getMinEvictableIdleTimeMillis() { @@ -656,15 +683,15 @@ public class DriverAdapterCPDS } /** - * Sets the minimum amount of time a statement may sit idle in the pool - * before it is eligible for eviction by the idle object evictor - * (if any). - * When non-positive, no objects will be evicted from the pool - * due to idle time alone. - * @param minEvictableIdleTimeMillis minimum time to set (in ms) + * Sets the minimum amount of time a statement may sit idle in the pool before it is eligible for eviction by the + * idle object evictor (if any). When non-positive, no objects will be evicted from the pool due to idle time alone. + * + * @param minEvictableIdleTimeMillis + * minimum time to set (in ms) * @see #getMinEvictableIdleTimeMillis() * @see #setTimeBetweenEvictionRunsMillis(long) - * @throws IllegalStateException if {@link #getPooledConnection()} has been called + * @throws IllegalStateException + * if {@link #getPooledConnection()} has been called */ public void setMinEvictableIdleTimeMillis(final int minEvictableIdleTimeMillis) { assertInitializationAllowed(); @@ -681,11 +708,11 @@ public class DriverAdapterCPDS } /** - * Sets the value of the accessToUnderlyingConnectionAllowed property. - * It controls if the PoolGuard allows access to the underlying connection. - * (Default: false) + * Sets the value of the accessToUnderlyingConnectionAllowed property. It controls if the PoolGuard allows access to + * the underlying connection. (Default: false) * - * @param allow Access to the underlying connection is granted when true. + * @param allow + * Access to the underlying connection is granted when true. */ public synchronized void setAccessToUnderlyingConnectionAllowed(final boolean allow) { this.accessToUnderlyingConnectionAllowed = allow; @@ -703,8 +730,9 @@ public class DriverAdapterCPDS /** * Sets the maximum number of prepared statements. - * @param maxPreparedStatements the new maximum number of prepared - * statements + * + * @param maxPreparedStatements + * the new maximum number of prepared statements */ public void setMaxPreparedStatements(final int maxPreparedStatements) { http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/b68e9f59/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java index f1e4413..4edbb2c 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java @@ -20,6 +20,7 @@ import org.apache.commons.dbcp2.PStmtKey; /** * A key uniquely identifying a {@link java.sql.PreparedStatement PreparedStatement}. + * * @since 2.0 * @deprecated Use {@link PStmtKey}. */ http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/b68e9f59/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java ---------------------------------------------------------------------- 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 ca41608..ba3105d 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java @@ -40,8 +40,7 @@ import org.apache.commons.pool2.PooledObject; import org.apache.commons.pool2.impl.DefaultPooledObject; /** - * Implementation of PooledConnection that is returned by - * PooledConnectionDataSource. + * Implementation of PooledConnection that is returned by PooledConnectionDataSource. * * @author John D. McNally * @since 2.0 @@ -93,7 +92,9 @@ class PooledConnectionImpl /** * Wraps the real connection. - * @param connection the connection to be wrapped + * + * @param connection + * the connection to be wrapped */ PooledConnectionImpl(final Connection connection) { this.connection = connection; @@ -107,10 +108,12 @@ class PooledConnectionImpl } /** - * My {@link KeyedPooledObjectFactory} method for activating - * {@link PreparedStatement}s. - * @param key ignored - * @param p ignored + * My {@link KeyedPooledObjectFactory} method for activating {@link PreparedStatement}s. + * + * @param key + * ignored + * @param p + * ignored */ @Override public void activateObject(final PStmtKey key, @@ -148,11 +151,11 @@ class PooledConnectionImpl } /** - * Closes the physical connection and marks this - * <code>PooledConnection</code> so that it may not be used - * to generate any more logical <code>Connection</code>s. + * Closes the physical connection and marks this <code>PooledConnection</code> so that it may not be used to + * generate any more logical <code>Connection</code>s. * - * @throws SQLException if an error occurs or the connection is already closed + * @throws SQLException + * if an error occurs or the connection is already closed */ @Override public void close() throws SQLException { @@ -252,10 +255,12 @@ class PooledConnectionImpl } /** - * My {@link KeyedPooledObjectFactory} method for destroying - * {@link PreparedStatement}s. - * @param key ignored - * @param p the wrapped {@link PreparedStatement} to be destroyed. + * My {@link KeyedPooledObjectFactory} method for destroying {@link PreparedStatement}s. + * + * @param key + * ignored + * @param p + * the wrapped {@link PreparedStatement} to be destroyed. */ @Override public void destroyObject(final PStmtKey key, @@ -265,8 +270,7 @@ class PooledConnectionImpl } /** - * Closes the physical connection and checks that the logical connection - * was closed as well. + * Closes the physical connection and checks that the logical connection was closed as well. */ @Override protected void finalize() throws Throwable { @@ -326,9 +330,10 @@ class PooledConnectionImpl } /** - * My {@link KeyedPooledObjectFactory} method for creating - * {@link PreparedStatement}s. - * @param key the key for the {@link PreparedStatement} to be created + * My {@link KeyedPooledObjectFactory} method for creating {@link PreparedStatement}s. + * + * @param key + * the key for the {@link PreparedStatement} to be created */ @SuppressWarnings("resource") @Override @@ -372,8 +377,7 @@ class PooledConnectionImpl } /** - * Normalizes the given SQL statement, producing a - * canonical form that is semantically equivalent to the original. + * Normalizes the given SQL statement, producing a canonical form that is semantically equivalent to the original. */ protected String normalizeSQL(final String sql) { return sql.trim(); @@ -391,10 +395,13 @@ class PooledConnectionImpl } /** - * My {@link KeyedPooledObjectFactory} method for passivating - * {@link PreparedStatement}s. Currently invokes {@link PreparedStatement#clearParameters}. - * @param key ignored - * @param p a wrapped {@link PreparedStatement} + * My {@link KeyedPooledObjectFactory} method for passivating {@link PreparedStatement}s. Currently invokes + * {@link PreparedStatement#clearParameters}. + * + * @param key + * ignored + * @param p + * a wrapped {@link PreparedStatement} */ @Override public void passivateObject(final PStmtKey key, @@ -500,7 +507,9 @@ class PooledConnectionImpl /** * Creates or obtains a {@link PreparedStatement} from my pool. - * @param sql the SQL statement + * + * @param sql + * the SQL statement * @return a {@link PoolablePreparedStatement} */ PreparedStatement prepareStatement(final String sql) throws SQLException { @@ -518,12 +527,12 @@ class PooledConnectionImpl /** * Creates or obtains a {@link PreparedStatement} from my pool. - * @param sql an SQL statement that may contain one or more '?' IN - * parameter placeholders - * @param autoGeneratedKeys a flag indicating whether auto-generated keys - * should be returned; one of - * <code>Statement.RETURN_GENERATED_KEYS</code> or - * <code>Statement.NO_GENERATED_KEYS</code> + * + * @param sql + * an SQL statement that may contain one or more '?' IN parameter placeholders + * @param autoGeneratedKeys + * a flag indicating whether auto-generated keys should be returned; one of + * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code> * @return a {@link PoolablePreparedStatement} * @see Connection#prepareStatement(String, int) */ @@ -557,16 +566,16 @@ class PooledConnectionImpl /** * Creates or obtains a {@link PreparedStatement} from my pool. - * @param sql a <code>String</code> object that is the SQL statement to - * be sent to the database; may contain one or more '?' IN - * parameters - * @param resultSetType a result set type; one of - * <code>ResultSet.TYPE_FORWARD_ONLY</code>, - * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or - * <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> - * @param resultSetConcurrency a concurrency type; one of - * <code>ResultSet.CONCUR_READ_ONLY</code> or - * <code>ResultSet.CONCUR_UPDATABLE</code> + * + * @param sql + * a <code>String</code> object that is the SQL statement to be sent to the database; may contain one or + * more '?' IN parameters + * @param resultSetType + * a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, + * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code> + * @param resultSetConcurrency + * a concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or + * <code>ResultSet.CONCUR_UPDATABLE</code> * * @return a {@link PoolablePreparedStatement} * @see Connection#prepareStatement(String, int, int) @@ -635,11 +644,11 @@ class PooledConnectionImpl /* JDBC_4_ANT_KEY_END */ /** - * Sets the value of the accessToUnderlyingConnectionAllowed property. - * It controls if the PoolGuard allows access to the underlying connection. - * (Default: false) + * Sets the value of the accessToUnderlyingConnectionAllowed property. It controls if the PoolGuard allows access to + * the underlying connection. (Default: false) * - * @param allow Access to the underlying connection is granted when true. + * @param allow + * Access to the underlying connection is granted when true. */ public synchronized void setAccessToUnderlyingConnectionAllowed(final boolean allow) { this.accessToUnderlyingConnectionAllowed = allow; @@ -651,10 +660,12 @@ class PooledConnectionImpl } /** - * My {@link KeyedPooledObjectFactory} method for validating - * {@link PreparedStatement}s. - * @param key ignored - * @param p ignored + * My {@link KeyedPooledObjectFactory} method for validating {@link PreparedStatement}s. + * + * @param key + * ignored + * @param p + * ignored * @return {@code true} */ @Override