Use lambdas for map entry iteration where possible

See gh-12626
This commit is contained in:
igor-suhorukov
2018-03-24 09:19:03 +03:00
committed by Phillip Webb
parent 78a94cafe1
commit 69bc19e0ca
31 changed files with 125 additions and 232 deletions

View File

@@ -93,17 +93,9 @@ public class SimpleConfigurationMetadataRepository
}
else {
// Merge properties
for (Map.Entry<String, ConfigurationMetadataProperty> entry : group
.getProperties().entrySet()) {
putIfAbsent(existingGroup.getProperties(), entry.getKey(),
entry.getValue());
}
group.getProperties().forEach((key, value) -> putIfAbsent(existingGroup.getProperties(), key, value));
// Merge sources
for (Map.Entry<String, ConfigurationMetadataSource> entry : group
.getSources().entrySet()) {
putIfAbsent(existingGroup.getSources(), entry.getKey(),
entry.getValue());
}
group.getSources().forEach((key, value) -> putIfAbsent(existingGroup.getSources(), key, value));
}
}