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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to