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 2023/10/23 16:45:16 UTC
[commons-dbcp] 01/06: Update call sites of deprecated APIs from Apache Commons Pool
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 f82332821cc0a6a36a7a731e9c5cd9271ad21183
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Oct 23 12:43:23 2023 -0400
Update call sites of deprecated APIs from Apache Commons Pool
---
.../org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 1c7ee353..7285c037 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
@@ -112,7 +112,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl
// PreparedStatement pool properties
private boolean poolPreparedStatements;
private int maxIdle = 10;
- private Duration durationBetweenEvictionRuns = BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS;
+ private Duration durationBetweenEvictionRuns = BaseObjectPoolConfig.DEFAULT_DURATION_BETWEEN_EVICTION_RUNS;
private int numTestsPerEvictionRun = -1;
private Duration minEvictableIdleDuration = BaseObjectPoolConfig.DEFAULT_MIN_EVICTABLE_IDLE_DURATION;
@@ -418,7 +418,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl
// evictor settings are the same as the connection pool settings.
config.setTimeBetweenEvictionRuns(getDurationBetweenEvictionRuns());
config.setNumTestsPerEvictionRun(getNumTestsPerEvictionRun());
- config.setMinEvictableIdleTime(getMinEvictableIdleDuration());
+ config.setMinEvictableIdleDuration(getMinEvictableIdleDuration());
} else {
// Since there is a limit, create a prepared statement pool without an eviction thread;
// pool has LRU functionality so when the limit is reached, 15% of the pool is cleared.
@@ -426,7 +426,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl
config.setMaxTotal(getMaxPreparedStatements());
config.setTimeBetweenEvictionRuns(Duration.ofMillis(-1));
config.setNumTestsPerEvictionRun(0);
- config.setMinEvictableIdleTime(Duration.ZERO);
+ config.setMinEvictableIdleDuration(Duration.ZERO);
}
stmtPool = new GenericKeyedObjectPool<>(pooledConnection, config);
pooledConnection.setStatementPool(stmtPool);