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 e0d0a48210a331e5e4e83dd37f378264efa09c95 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Jul 16 12:16:05 2022 -0400 Use forEach() --- .../configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java b/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java index 866ff335..fad86655 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java +++ b/src/main/java/org/apache/commons/configuration2/tree/xpath/ConfigurationNodeIteratorAttribute.java @@ -87,11 +87,11 @@ class ConfigurationNodeIteratorAttribute<T> extends ConfigurationNodeIteratorBas } else { final Set<String> names = new LinkedHashSet<>(parent.getNodeHandler().getAttributes(parent.getConfigurationNode())); final String prefix = name.getPrefix() != null ? prefixName(name.getPrefix(), null) : null; - for (final String n : names) { + names.forEach(n -> { if (prefix == null || StringUtils.startsWith(n, prefix)) { addAttributeData(parent, result, n); } - } + }); } return result;