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/01/20 13:51:27 UTC
[commons-pool] branch master updated: BaseGenericObjectPool now implements AutoCloseable
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-pool.git
The following commit(s) were added to refs/heads/master by this push:
new 24de1900 BaseGenericObjectPool now implements AutoCloseable
24de1900 is described below
commit 24de19001e939d6778b92bdd47eed8051786330f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jan 20 08:51:23 2023 -0500
BaseGenericObjectPool now implements AutoCloseable
---
src/changes/changes.xml | 3 +++
src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b9dc3199..55d8477f 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -91,6 +91,9 @@ The <action> type attribute can be add,update,fix,remove.
<action dev="ggregory" type="add">
Add BaseGenericObjectPool.Evictor.toString().
</action>
+ <action dev="ggregory" type="add">
+ BaseGenericObjectPool now implements AutoCloseable.
+ </action>
<!-- UPDATE -->
<action dev="kinow" type="update" due-to="Dependabot, Gary Gregory">
Bump actions/cache from 2.1.6 to 3.0.10 #117, #138, #158, #174, #178.
diff --git a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
index dd96a6f4..f5bf4f4e 100644
--- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
+++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
@@ -61,7 +61,7 @@ import org.apache.commons.pool2.SwallowedExceptionListener;
*
* @since 2.0
*/
-public abstract class BaseGenericObjectPool<T, E extends Exception> extends BaseObject {
+public abstract class BaseGenericObjectPool<T, E extends Exception> extends BaseObject implements AutoCloseable {
/**
* The idle object eviction iterator. Holds a reference to the idle objects.
@@ -463,6 +463,7 @@ public abstract class BaseGenericObjectPool<T, E extends Exception> extends Base
* Closes the pool, destroys the remaining idle objects and, if registered
* in JMX, deregisters it.
*/
+ @Override
public abstract void close();
/**