Files
openide/java/java-tests/testData/refactoring/introduceVariable/WhileConditionAndOr.after.java
Tagir Valeev 48beacdfa3 [java-refactoring] Introduce variable: extract loop invariants (at least simple ones) outside of while loop
Fixes some of annoying cases like reported in IDEA-210010

GitOrigin-RevId: b083327807d85666d1f71f96a90d0eddd616754f
2020-12-21 10:44:43 +00:00

11 lines
209 B
Java

import java.util.Arrays;
class Test {
void test(int x, int y, int z) {
while (x > 0) {
boolean temp = z > 0;
if (!(y < 0 || temp)) break;
z++;
}
}
}