mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-21 14:37:45 +07:00
StreamToLoopInspection: handle some if/ifPresent cases
This commit is contained in:
+3
-3
@@ -6,19 +6,19 @@ import static java.util.Arrays.asList;
|
||||
|
||||
public class Main {
|
||||
public static void test(List<List<String>> list) {
|
||||
boolean allMatch = true;
|
||||
boolean b = true;
|
||||
OUTER:
|
||||
for (List<String> x : list) {
|
||||
if (x != null) {
|
||||
for (String s : x) {
|
||||
if (!s.startsWith("a")) {
|
||||
allMatch = false;
|
||||
b = false;
|
||||
break OUTER;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(allMatch) {
|
||||
if(b) {
|
||||
System.out.println("ok");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user