[java-inspections] IDEA-316416 else in do while

GitOrigin-RevId: 841d0325f0ad3b580a6b494bdba7c43305dda974
This commit is contained in:
Mikhail Pyltsin
2023-04-13 16:19:27 +02:00
committed by intellij-monorepo-bot
parent 40e48e7550
commit 24c3529b7b
2 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// "Move condition to loop" "false"
class Main {
private static int getI() {
return 0;
}
public static void test3() {
int i = getI();
do {
System.out.println(1);
if (i == 1) {
break;
}else{
System.out.println(1);
}
} while<caret> (true);
}
}