IDEA-160988 Add inspection to merge adjacent Stream API calls

This commit is contained in:
Tagir Valeev
2016-10-17 17:14:22 +07:00
parent de4563d048
commit 86eaaf22bf
31 changed files with 564 additions and 11 deletions

View File

@@ -0,0 +1,9 @@
// "Merge 'map' call and 'boxed' call" "true"
import java.util.List;
import java.util.stream.IntStream;
public class Main {
public static void test(List<CharSequence> list) {
list.stream().map(cs -> (String)cs).mapToInt(String::length).asLongStream().mapToObj(x -> (Long) (x * 2)).forEach(System.out::println);
}
}