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



##########
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:
       Why not use a lambda?




-- 
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-unsubscr...@commons.apache.org

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


Reply via email to