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
The following commit(s) were added to refs/heads/master by this push: new d005ee4 Add elements of a collections without a loop. d005ee4 is described below commit d005ee4a4e3569c3d8a431f734c271c4fc1f8878 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Nov 20 12:55:25 2020 -0500 Add elements of a collections without a loop. --- .../java/org/apache/commons/configuration2/tree/NodeTreeWalker.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java b/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java index d944d01..dbc133e 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java @@ -148,10 +148,7 @@ public class NodeTreeWalker final T node = pendingNodes.remove(0); visitor.visitBeforeChildren(node, handler); cancel = visitor.terminate(); - for (final T c : handler.getChildren(node)) - { - pendingNodes.add(c); - } + pendingNodes.addAll(handler.getChildren(node)); } }