mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
15 lines
472 B
Java
15 lines
472 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Main {
|
|
private static long test(List<? extends String> list) {
|
|
return Stream.of(0, null, "1", list).flatMap(Stream::of).flatMap(Stream::of).flatMap(Stream::of).flatMap(Stream::of).flatMap(Stream::of).coun<caret>t();
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
test(Arrays.asList("aa", "bbb", "c", null, "dd"));
|
|
}
|
|
} |