You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/09/03 12:20:01 UTC

(commons-pool) 02/02: Use forEach()

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git

commit 7abfb24b4c05d277c1ce2e155dbb64f68e9fdf3e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Sep 3 08:19:54 2024 -0400

    Use forEach()
---
 src/test/java/org/apache/commons/pool3/WaiterFactory.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/commons/pool3/WaiterFactory.java b/src/test/java/org/apache/commons/pool3/WaiterFactory.java
index 2483ac27..29ed3453 100644
--- a/src/test/java/org/apache/commons/pool3/WaiterFactory.java
+++ b/src/test/java/org/apache/commons/pool3/WaiterFactory.java
@@ -194,9 +194,7 @@ public class WaiterFactory<K> implements PooledObjectFactory<Waiter, IllegalStat
         if (activeCounts.isEmpty()) {
             return;
         }
-        for (final K key : activeCounts.keySet()) {
-            activeCounts.put(key, ZERO);
-        }
+        activeCounts.keySet().forEach(key -> activeCounts.put(key, ZERO));
     }
 
     @Override