mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-26 08:59:09 +00:00
Refact iterator of Map with Java 8 forEach
See gh-1451
This commit is contained in:
+1
-3
@@ -369,9 +369,7 @@ public class GenericConversionServiceTests {
|
||||
watch.start("convert 4,000,000 manually");
|
||||
for (int i = 0; i < 4000000; i++) {
|
||||
Map<String, Integer> target = new HashMap<>(source.size());
|
||||
for (Map.Entry<String, String> entry : source.entrySet()) {
|
||||
target.put(entry.getKey(), Integer.valueOf(entry.getValue()));
|
||||
}
|
||||
source.forEach((k, v) -> target.put(k, Integer.valueOf(v)));
|
||||
}
|
||||
watch.stop();
|
||||
// System.out.println(watch.prettyPrint());
|
||||
|
||||
Reference in New Issue
Block a user