mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 09:20:53 +07:00
15 lines
382 B
Java
15 lines
382 B
Java
// "Simplify 'test(...) || obj == null' to true extracting side effects" "true-preview"
|
|
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");
|
|
}
|
|
}
|
|
} |