mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 19:49:44 +07:00
IDEA-127352 no warning when @NotNull annotated method returns null
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class BrokenAlignment {
|
||||
|
||||
private static final String DEFAULT = null;
|
||||
|
||||
@NotNull
|
||||
public String getDefaultValue() {
|
||||
return <warning descr="Expression 'DEFAULT' might evaluate to null but is returned by the method declared as @NotNull">DEFAULT</warning>;
|
||||
}
|
||||
}
|
||||
@@ -111,6 +111,7 @@ public class DataFlowInspectionTest extends LightCodeInsightFixtureTestCase {
|
||||
public void testSynchronizingOnNullable() throws Throwable { doTest(); }
|
||||
public void testSwitchOnNullable() { doTest(); }
|
||||
public void testReturningNullFromVoidMethod() throws Throwable { doTest(); }
|
||||
public void testReturningNullConstant() { doTest(); }
|
||||
|
||||
public void testCatchRuntimeException() throws Throwable { doTest(); }
|
||||
// IDEA-129331
|
||||
|
||||
Reference in New Issue
Block a user