mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
StreamToLoopInspection: handle some if/ifPresent cases
This commit is contained in:
+1
-5
@@ -5,18 +5,14 @@ import java.util.List;
|
||||
|
||||
public class Main {
|
||||
private static void test(List<String> list) {
|
||||
boolean found = false;
|
||||
for (String x : list) {
|
||||
if (x != null) {
|
||||
if (x.startsWith("x")) {
|
||||
found = true;
|
||||
System.out.println("Ok!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(found) {
|
||||
System.out.println("Ok!");
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user