You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2023/07/30 19:55:33 UTC

[commons-pool] 01/02: Javadoc.

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

commit c55477ee6732ace2fa8a8ea5b088baf19a06450e
Author: psteitz <ph...@gmail.com>
AuthorDate: Sun Jul 30 12:54:10 2023 -0700

    Javadoc.
---
 .../java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
index 5c887e6b..4f927fb5 100644
--- a/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
+++ b/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
@@ -1721,9 +1721,12 @@ public class GenericKeyedObjectPool<K, T> extends BaseGenericObjectPool<T>
     }
 
     /**
-     * Whether there is at least one thread waiting on this deque, add an pool object.
+     * When there is at least one thread waiting on the given deque, try to add an instance to pool under the given key.
+     * NOTE: there is no check that the key corresponds to the deque (it is assumed that the key was used to get the deque
+     * from the poolMap)
+     *
      * @param key pool key.
-     * @param idleObjects list of idle pool objects.
+     * @param idleObjects deque backing the pool under the given key
      */
     private void whenWaitersAddObject(final K key, final LinkedBlockingDeque<PooledObject<T>> idleObjects) {
         if (idleObjects.hasTakeWaiters()) {