mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-64875 "Constant conditions and exceptions" should eliminate false positives by analyzing static final constants
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import org.jetbrains.annotations.*;
|
||||
class Class1 {
|
||||
public void f(@Nullable Object o) {
|
||||
o = o != null ? o : Class2.O;
|
||||
o.toString();
|
||||
}
|
||||
}
|
||||
class Class2 {
|
||||
static final Object O = new Object();
|
||||
}
|
||||
@@ -74,5 +74,6 @@ public class DataFlowInspectionFixtureTest extends JavaCodeInsightFixtureTestCas
|
||||
public void testVisitFinallyOnce() throws Throwable { doTest(); }
|
||||
public void testNotEqualsDoesntImplyNotNullity() throws Throwable { doTest(); }
|
||||
public void testEqualsEnumConstant() throws Throwable { doTest(); }
|
||||
public void testEqualsConstant() throws Throwable { doTest(); }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user