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

@@ -20,7 +20,6 @@ import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.gradle.api.Action;
import org.gradle.api.Project;
@@ -110,9 +109,7 @@ public class BuildInfo extends ConventionTask {
private Map<String, String> coerceToStringValues(Map<String, Object> input) {
Map<String, String> output = new HashMap<>();
for (Entry<String, Object> entry : input.entrySet()) {
output.put(entry.getKey(), entry.getValue().toString());
}
input.forEach((key, value) -> output.put(key, value.toString()));
return output;
}