This is an automated email from the ASF dual-hosted git repository. psteitz pushed a commit to branch POOL_2_X in repository https://gitbox.apache.org/repos/asf/commons-pool.git
The following commit(s) were added to refs/heads/POOL_2_X by this push: new 3f2e90e4 Javadoc improvements. 3f2e90e4 is described below commit 3f2e90e4eb3a6fcd5de1dcb1ee7c95d0839c151d Author: psteitz <phil.ste...@gmail.com> AuthorDate: Wed Sep 20 16:07:48 2023 -0700 Javadoc improvements. --- src/main/java/org/apache/commons/pool2/KeyedObjectPool.java | 4 ++++ .../java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java | 4 ++-- .../java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java index 178a8e52..27317ff9 100644 --- a/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/KeyedObjectPool.java @@ -214,6 +214,10 @@ public interface KeyedObjectPool<K, V> extends Closeable { /** * Gets a copy of the pool key list. + * <p> + * Note: The default implementation returns an empty list. + * Implementations should override this method. + * </p> * * @return a copy of the pool key list. * @since 2.12.0 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 fc95ba32..dcc1bc5c 100644 --- a/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java @@ -54,7 +54,7 @@ import org.apache.commons.pool2.SwallowedExceptionListener; * and {@link GenericKeyedObjectPool}. The primary reason this class exists is * reduce code duplication between the two pool implementations. * <p> - * This class is intended to be thread-safe. + * Concrete implementations of this class are expected to be thread-safe. * </p> * * @param <T> Type of element pooled in this pool. @@ -1387,7 +1387,7 @@ public abstract class BaseGenericObjectPool<T> extends BaseObject implements Aut * Sets the number of milliseconds to sleep between runs of the idle object evictor thread. * <ul> * <li>When positive, the idle object evictor thread starts.</li> - * <li>When non-positive, no idle object evictor thread runs.</li> + * <li>When null or non-positive, no idle object evictor thread runs.</li> * </ul> * * @param timeBetweenEvictionRuns diff --git a/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java index 7c4dff9e..0259429e 100644 --- a/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java +++ b/src/main/java/org/apache/commons/pool2/proxy/ProxiedKeyedObjectPool.java @@ -81,6 +81,12 @@ public class ProxiedKeyedObjectPool<K, V> implements KeyedObjectPool<K, V> { pool.close(); } + /** + * Gets a copy of the pool key list. + * + * @return a copy of the pool key list. + * @since 2.12.0 + */ @Override public List<K> getKeys() { return pool.getKeys();