Commit 84eacc49 authored by zhuzhuman's avatar zhuzhuman Committed by Stephane Nicoll

Simplify for statement with Collection copy

See gh-17827
parent 6777a437
......@@ -115,9 +115,7 @@ class SpringIterableConfigurationPropertySource extends SpringConfigurationPrope
String[] names = getPropertySource().getPropertyNames();
List<PropertyMapping> mappings = new ArrayList<>(names.length * 2);
for (String name : names) {
for (PropertyMapping mapping : getMapper().map(name)) {
mappings.add(mapping);
}
Collections.addAll(mappings, getMapper().map(name));
}
result = mappings.toArray(new PropertyMapping[0]);
if (cache != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment