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

@@ -63,13 +63,13 @@ public class DevToolsSettings {
private Map<String, Pattern> getPatterns(Map<?, ?> properties, String prefix) {
Map<String, Pattern> patterns = new LinkedHashMap<>();
for (Map.Entry<?, ?> entry : properties.entrySet()) {
String name = String.valueOf(entry.getKey());
properties.forEach((key, value) -> {
String name = String.valueOf(key);
if (name.startsWith(prefix)) {
Pattern pattern = Pattern.compile((String) entry.getValue());
Pattern pattern = Pattern.compile((String) value);
patterns.put(name, pattern);
}
}
});
return patterns;
}