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-configuration.git

commit 473cd97390731161967a1921dee2a9d9f54e662a
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Jul 16 12:14:59 2022 -0400

    Use forEach()
---
 .../commons/configuration2/tree/AbstractImmutableNodeHandler.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java
 
b/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java
index 8169332f..d838b66e 100644
--- 
a/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java
+++ 
b/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java
@@ -60,11 +60,11 @@ abstract class AbstractImmutableNodeHandler implements 
NodeHandler<ImmutableNode
     @Override
     public <C> List<ImmutableNode> getMatchingChildren(final ImmutableNode 
node, final NodeMatcher<C> matcher, final C criterion) {
         final List<ImmutableNode> result = new 
ArrayList<>(node.getChildren().size());
-        for (final ImmutableNode c : node) {
+        node.forEach(c -> {
             if (matcher.matches(c, this, criterion)) {
                 result.add(c);
             }
-        }
+        });
         return Collections.unmodifiableList(result);
     }
 

Reply via email to