mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
IDEA-89654 Incorrect control flow warning with @Nullable
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import org.jetbrains.annotations.*;
|
||||
class TestIDEAWarn {
|
||||
void method(@Nullable MyEnum e) {
|
||||
if (e != MyEnum.foo) {return;}
|
||||
System.out.println(e.hashCode());
|
||||
}
|
||||
void method2(@Nullable MyEnum e) {
|
||||
if (e == MyEnum.foo) {
|
||||
System.out.println(e.hashCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
enum MyEnum { foo, bar }
|
||||
@@ -73,5 +73,6 @@ public class DataFlowInspectionFixtureTest extends JavaCodeInsightFixtureTestCas
|
||||
public void testEqualsNotNull() throws Throwable { doTest(); }
|
||||
public void testVisitFinallyOnce() throws Throwable { doTest(); }
|
||||
public void testNotEqualsDoesntImplyNotNullity() throws Throwable { doTest(); }
|
||||
public void testEqualsEnumConstant() throws Throwable { doTest(); }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user