IDEA-180417 Generated code ("Replace with collect") is invalid

This commit is contained in:
Tagir Valeev
2017-10-13 13:04:12 +07:00
parent 326b6c5ba0
commit 59c3fd672a
2 changed files with 6 additions and 1 deletions
@@ -13,7 +13,7 @@ class Maps {
public class Test {
public void test() {
Map<String, Integer> map = IntStream.range(0, 10).filter(i -> i % 2 == 0).collect(Collectors.toMap(String::valueOf, i -> i, (a, b) -> b));
Map<String, Integer> map = IntStream.range(0, 10).filter(i -> i % 2 == 0).boxed().collect(Collectors.toMap(String::valueOf, i -> i, (a, b) -> b));
System.out.println(map);
}
}