You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/11/12 18:20:06 UTC

[GitHub] [commons-pool] psteitz commented on a change in pull request #113: Ensure capacity freed by clear is made available to GKOP borrowers. J…

psteitz commented on a change in pull request #113:
URL: https://github.com/apache/commons-pool/pull/113#discussion_r748497182



##########
File path: src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
##########
@@ -570,23 +569,47 @@ private int calculateDeficit(final ObjectDeque<T> objectDeque) {
      */
     @Override
     public void clear() {
-        poolMap.keySet().forEach(this::clear);
-    }
+        final Iterator<K> iter = poolMap.keySet().iterator();
 
+        while (iter.hasNext()) {
+            clear(iter.next(), false);
+        }
+    }

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org