mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-30498 Nullability not checked in initializer for static field
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
||||
class Foo {
|
||||
@Nullable static Object foo() { return null; }
|
||||
static String bar(@NotNull Object arg) { return ""; }
|
||||
}
|
||||
class Bar {
|
||||
public static final String s = Foo.bar(<warning descr="Argument 'Foo.foo()' might be null">Foo.foo()</warning>);
|
||||
@NotNull public static Object o = <warning descr="Expression 'Foo.foo()' might evaluate to null but is assigned to a variable that is annotated with @NotNull">Foo.foo()</warning>;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user