mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 03:37:58 +07:00
IDEA-161061 Quick-fix to replace nullableExpr.equals(...) with Objects.equals(nullableExpr, ...)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// "Replace 'foo().equals(...)' with 'Objects.equals(foo(), ...)'" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
class A{
|
||||
void test(Object bar) {
|
||||
if (Objects.equals(foo(), bar)) {}
|
||||
}
|
||||
|
||||
@Nullable Object foo();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace 'foo().equals(...)' with 'Objects.equals(foo(), ...)'" "true"
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
class A{
|
||||
void test(Object bar) {
|
||||
if (foo().equa<caret>ls(bar)) {}
|
||||
}
|
||||
|
||||
@Nullable Object foo();
|
||||
}
|
||||
Reference in New Issue
Block a user