mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 04:50:58 +07:00
16 lines
359 B
Java
16 lines
359 B
Java
// "Replace '(random() ? foo() : bar()).equals(...)' with 'Objects.equals(random() ? foo() : bar(), ...)'" "true-preview"
|
|
|
|
import org.jetbrains.annotations.*;
|
|
|
|
import java.util.Objects;
|
|
|
|
class A{
|
|
void test(Object bar) {
|
|
if (Objects.equals(random() ? foo() : bar(), bar)) {}
|
|
}
|
|
|
|
@Nullable Object foo();
|
|
@Nullable Object bar();
|
|
|
|
boolean random();
|
|
} |