Simplify for statement with Collection copy
See gh-17827
This commit is contained in:
committed by
Stephane Nicoll
parent
6777a437d4
commit
84eacc49ed
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user