You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/01/21 19:21:08 UTC
(commons-dbcp) 01/02: Fix ParenPad
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
commit 7851c38a90b718663e30e0f8fb1ce61735bae55c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jan 21 14:20:55 2025 -0500
Fix ParenPad
---
.../java/org/apache/commons/dbcp2/TestPoolingDataSource.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/test/java/org/apache/commons/dbcp2/TestPoolingDataSource.java b/src/test/java/org/apache/commons/dbcp2/TestPoolingDataSource.java
index 208f1904..009c216e 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestPoolingDataSource.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestPoolingDataSource.java
@@ -78,15 +78,11 @@ public class TestPoolingDataSource extends TestConnectionPool {
@Test
public void testClose() throws Exception {
-
final Properties properties = new Properties();
properties.setProperty(Constants.KEY_USER, "userName");
properties.setProperty(Constants.KEY_PASSWORD, "password");
- final PoolableConnectionFactory f =
- new PoolableConnectionFactory(
- new DriverConnectionFactory(new TesterDriver(),
- "jdbc:apache:commons:testdriver", properties),
- null);
+ final PoolableConnectionFactory f = new PoolableConnectionFactory(
+ new DriverConnectionFactory(new TesterDriver(), "jdbc:apache:commons:testdriver", properties), null);
f.setValidationQuery("SELECT DUMMY FROM DUAL");
f.setDefaultReadOnly(Boolean.TRUE);
f.setDefaultAutoCommit(Boolean.TRUE);
@@ -94,7 +90,7 @@ public class TestPoolingDataSource extends TestConnectionPool {
p.setMaxTotal(getMaxTotal());
p.setMaxWait(getMaxWaitDuration());
- try ( PoolingDataSource<PoolableConnection> dataSource = new PoolingDataSource<>(p) ) {
+ try (PoolingDataSource<PoolableConnection> dataSource = new PoolingDataSource<>(p)) {
final Connection connection = dataSource.getConnection();
assertNotNull(connection);
connection.close();