Polish "Use lambdas for map entry iteration where possible"

Closes gh-12626
This commit is contained in:
Phillip Webb
2018-04-04 19:35:41 -07:00
parent 69bc19e0ca
commit 685babc829
27 changed files with 209 additions and 176 deletions

View File

@@ -78,7 +78,8 @@ public final class BuildPropertiesWriter {
DateTimeFormatter.ISO_INSTANT.format(project.getTime()));
}
if (project.getAdditionalProperties() != null) {
project.getAdditionalProperties().forEach((key, value) -> properties.put("build." + key, value));
project.getAdditionalProperties()
.forEach((name, value) -> properties.put("build." + name, value));
}
return properties;
}
@@ -114,9 +115,9 @@ public final class BuildPropertiesWriter {
private static void validateAdditionalProperties(
Map<String, String> additionalProperties) {
if (additionalProperties != null) {
additionalProperties.forEach((key, value) -> {
additionalProperties.forEach((name, value) -> {
if (value == null) {
throw new NullAdditionalPropertyValueException(key);
throw new NullAdditionalPropertyValueException(name);
}
});
}