mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
StreamToLoop tests grouped
This commit is contained in:
+13
-2
@@ -1,6 +1,6 @@
|
||||
// "Replace Stream API chain with loop" "true"
|
||||
// "Fix all 'Stream API call chain can be replaced with loop' problems in file" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
@@ -18,6 +18,17 @@ public class Main {
|
||||
return false;
|
||||
}
|
||||
|
||||
String testTernary(String[] strings) {
|
||||
for (String s : strings) {
|
||||
if (s != null) {
|
||||
if (!s.startsWith("xyz")) {
|
||||
return "s";
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(test(asList(asList(), asList("a"), asList("b", "c"))));
|
||||
System.out.println(test(asList(asList(), asList("d"), asList("b", "c"))));
|
||||
|
||||
Reference in New Issue
Block a user