mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 00:19:11 +07:00
The annotation may differ, depending on library used. Also, it could be a container annotation like @NullMarked or @NotNullByDefault, so let's use more neutral wording GitOrigin-RevId: cb4923f5ec3974f56ec1b6763c2405c1471bf601
16 lines
555 B
Java
16 lines
555 B
Java
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 = Foo.foo();
|
|
|
|
}
|
|
class Baz {
|
|
@NotNull public static Object o = <warning descr="Expression 'Foo.foo()' might evaluate to null but is assigned to a non-null variable">Foo.foo()</warning>;
|
|
} |