mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
IDEA-161198 Migration from Stream API back to for loops
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public static int test(List<String> list) {
|
||||
return list.stream().peek(s -> System.out.println(s)).mapToInt(l -> l.length()).s<caret>um();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(test(Arrays.asList("aaa", "b", "cc", "dddd")));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user