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:
+18
@@ -0,0 +1,18 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
private static Integer test(List<Integer> numbers) {
|
||||
Integer acc = 0;
|
||||
for (Integer number : numbers) {
|
||||
acc = Math.max(acc, number);
|
||||
}
|
||||
return acc;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
test(Arrays.asList("a", "b", "xyz"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user