This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
commit 21b5cdd4358a565d339a58ce6d5eb279d885536c Author: Mark Thomas <[email protected]> AuthorDate: Tue Dec 16 17:17:36 2025 +0000 Fix indent --- .../apache/commons/dbcp2/DelegatingConnection.java | 6 ++--- .../commons/dbcp2/DriverConnectionFactory.java | 2 +- .../java/org/apache/commons/dbcp2/PStmtKey.java | 28 +++++++++++----------- .../apache/commons/dbcp2/PoolableConnection.java | 4 ++-- src/main/java/org/apache/commons/dbcp2/Utils.java | 2 +- .../dbcp2/cpdsadapter/PooledConnectionImpl.java | 2 +- .../dbcp2/datasources/PooledConnectionManager.java | 6 ++--- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java index 98af01cd..a56c6b47 100644 --- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java +++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java @@ -291,7 +291,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i @SuppressWarnings("resource") // Caller is responsible for closing the resource. @Override public Statement createStatement(final int resultSetType, final int resultSetConcurrency, - final int resultSetHoldability) throws SQLException { + final int resultSetHoldability) throws SQLException { checkOpen(); try { return init(new DelegatingStatement(this, @@ -719,7 +719,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i @SuppressWarnings("resource") // Caller is responsible for closing the resource. @Override public CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency, - final int resultSetHoldability) throws SQLException { + final int resultSetHoldability) throws SQLException { checkOpen(); try { return init(new DelegatingCallableStatement(this, @@ -771,7 +771,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i @SuppressWarnings("resource") // Caller is responsible for closing the resource. @Override public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency, - final int resultSetHoldability) throws SQLException { + final int resultSetHoldability) throws SQLException { checkOpen(); try { return init(new DelegatingPreparedStatement(this, diff --git a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java index db31faf1..9eb1c294 100644 --- a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java +++ b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java @@ -85,6 +85,6 @@ public class DriverConnectionFactory implements ConnectionFactory { @Override public String toString() { return this.getClass().getName() + " [" + driver + ";" + connectionString + ";" - + Utils.cloneWithoutCredentials(properties) + "]"; + + Utils.cloneWithoutCredentials(properties) + "]"; } } diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java index 56d58128..20642a56 100644 --- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java +++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java @@ -224,7 +224,7 @@ public class PStmtKey { */ @Deprecated public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability, - final StatementType statementType) { + final StatementType statementType) { this(sql, catalog, null, resultSetType, resultSetConcurrency, resultSetHoldability, null, null, null, statementType, k -> match(statementType, StatementHoldability, CallHoldability)); } @@ -244,7 +244,7 @@ public class PStmtKey { @Deprecated public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency, final StatementType statementType) { this(sql, catalog, null, resultSetType, resultSetConcurrency, null, null, null, null, statementType, - k -> match(statementType, StatementConcurrency, CallConcurrency)); + k -> match(statementType, StatementConcurrency, CallConcurrency)); } /** @@ -287,7 +287,7 @@ public class PStmtKey { @Deprecated public PStmtKey(final String sql, final String catalog, final StatementType statementType, final Integer autoGeneratedKeys) { this(sql, catalog, null, null, null, null, autoGeneratedKeys, null, null, statementType, - k -> match(statementType, StatementAutoGeneratedKeys, CallSQL)); + k -> match(statementType, StatementAutoGeneratedKeys, CallSQL)); } /** @@ -346,7 +346,7 @@ public class PStmtKey { * @since 2.5.0 */ public PStmtKey(final String sql, final String catalog, final String schema, final int resultSetType, final int resultSetConcurrency, - final int resultSetHoldability) { + final int resultSetHoldability) { this(sql, catalog, schema, resultSetType, resultSetConcurrency, resultSetHoldability, StatementType.PREPARED_STATEMENT); } @@ -366,9 +366,9 @@ public class PStmtKey { * @since 2.5.0 */ public PStmtKey(final String sql, final String catalog, final String schema, final int resultSetType, final int resultSetConcurrency, - final int resultSetHoldability, final StatementType statementType) { + final int resultSetHoldability, final StatementType statementType) { this(sql, catalog, schema, resultSetType, resultSetConcurrency, resultSetHoldability, null, null, null, statementType, - k -> match(statementType, StatementHoldability, CallHoldability)); + k -> match(statementType, StatementHoldability, CallHoldability)); } /** @@ -385,9 +385,9 @@ public class PStmtKey { * @since 2.5.0 */ public PStmtKey(final String sql, final String catalog, final String schema, final int resultSetType, final int resultSetConcurrency, - final StatementType statementType) { + final StatementType statementType) { this(sql, catalog, schema, resultSetType, resultSetConcurrency, null, null, null, null, statementType, - k -> match(statementType, StatementConcurrency, CallConcurrency)); + k -> match(statementType, StatementConcurrency, CallConcurrency)); } /** @@ -404,8 +404,8 @@ public class PStmtKey { } private PStmtKey(final String sql, final String catalog, final String schema, final Integer resultSetType, final Integer resultSetConcurrency, - final Integer resultSetHoldability, final Integer autoGeneratedKeys, final int[] columnIndexes, final String[] columnNames, - final StatementType statementType, final Function<PStmtKey, StatementBuilder> statementBuilder) { + final Integer resultSetHoldability, final Integer autoGeneratedKeys, final int[] columnIndexes, final String[] columnNames, + final StatementType statementType, final Function<PStmtKey, StatementBuilder> statementBuilder) { this.sql = Objects.requireNonNull(sql, "sql").trim(); this.catalog = catalog; this.schema = schema; @@ -421,8 +421,8 @@ public class PStmtKey { // Root constructor. private PStmtKey(final String sql, final String catalog, final String schema, final Integer resultSetType, final Integer resultSetConcurrency, - final Integer resultSetHoldability, final Integer autoGeneratedKeys, final int[] columnIndexes, final String[] columnNames, - final StatementType statementType, final StatementBuilder statementBuilder) { + final Integer resultSetHoldability, final Integer autoGeneratedKeys, final int[] columnIndexes, final String[] columnNames, + final StatementType statementType, final StatementBuilder statementBuilder) { this.sql = sql; this.catalog = catalog; this.schema = schema; @@ -462,7 +462,7 @@ public class PStmtKey { */ public PStmtKey(final String sql, final String catalog, final String schema, final StatementType statementType, final Integer autoGeneratedKeys) { this(sql, catalog, schema, null, null, null, autoGeneratedKeys, null, null, statementType, - k -> match(statementType, StatementAutoGeneratedKeys, CallSQL)); + k -> match(statementType, StatementAutoGeneratedKeys, CallSQL)); } /** @@ -632,7 +632,7 @@ public class PStmtKey { @Override public int hashCode() { return Objects.hash(autoGeneratedKeys, catalog, Arrays.hashCode(columnIndexes), Arrays.hashCode(columnNames), resultSetConcurrency, - resultSetHoldability, resultSetType, schema, sql, statementType); + resultSetHoldability, resultSetType, schema, sql, statementType); } @Override diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java index e39ea1bc..0b4e1b6c 100644 --- a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java +++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java @@ -311,8 +311,8 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme return false; } fatalException = disconnectionSqlCodes == null - ? sqlState.startsWith(Utils.DISCONNECTION_SQL_CODE_PREFIX) || Utils.isDisconnectionSqlCode(sqlState) - : disconnectionSqlCodes.contains(sqlState); + ? sqlState.startsWith(Utils.DISCONNECTION_SQL_CODE_PREFIX) || Utils.isDisconnectionSqlCode(sqlState) + : disconnectionSqlCodes.contains(sqlState); } return fatalException; } diff --git a/src/main/java/org/apache/commons/dbcp2/Utils.java b/src/main/java/org/apache/commons/dbcp2/Utils.java index 47a5de59..3892fbf9 100644 --- a/src/main/java/org/apache/commons/dbcp2/Utils.java +++ b/src/main/java/org/apache/commons/dbcp2/Utils.java @@ -39,7 +39,7 @@ import org.apache.commons.pool2.PooledObject; public final class Utils { private static final ResourceBundle messages = ResourceBundle - .getBundle(Utils.class.getPackage().getName() + ".LocalStrings"); + .getBundle(Utils.class.getPackage().getName() + ".LocalStrings"); /** * Whether the security manager is enabled. 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 3ba38694..42433aa9 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/PooledConnectionImpl.java @@ -260,7 +260,7 @@ final class PooledConnectionImpl * @since 2.4.0 */ protected PStmtKey createKey(final String sql, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability, - final StatementType statementType) { + final StatementType statementType) { return new PStmtKey(sql, getCatalogOrNull(), getSchemaOrNull(), resultSetType, resultSetConcurrency, resultSetHoldability, statementType); } diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java b/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java index b7f288cf..5030ab38 100644 --- a/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java +++ b/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java @@ -54,9 +54,9 @@ interface PooledConnectionManager { * @param password password used when authenticating to the database. * @since 2.14.0 */ - default void setPassword(final char[] password) { - setPassword(String.copyValueOf(password)); - } + default void setPassword(final char[] password) { + setPassword(String.copyValueOf(password)); + } /** * Sets the database password used when creating connections.
