Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/simplifyBooleanExpressionFix/beforeWhileWithSideEffects2.java
Ilyas Selimov 3642a47796 DFA - moved the tests associated with "Simplify" quick-fix to a dedicated place
GitOrigin-RevId: 8bd67d61335fc77c2f8e115bfda45ade06041283
2021-05-18 10:27:41 +00:00

15 lines
374 B
Java

// "Simplify 'test(...) || obj == null' to true extracting side effects" "true"
import org.jetbrains.annotations.Contract;
class X {
@Contract("_ -> true")
boolean test(Object obj) {
return true;
}
void doSmth(Object obj) {
while(obj != null && (test(obj) <caret>|| obj == null)) {
System.out.println("aaahh");
}
}
}