mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-21 17:52:27 +07:00
GitOrigin-RevId: 2834d00f1385759947351f8b93d8fc6a18a45106
26 lines
548 B
Java
26 lines
548 B
Java
import org.jetbrains.annotations.*;
|
|
|
|
class Inspection {
|
|
|
|
@Nullable
|
|
private Object o;
|
|
|
|
public void test1() {
|
|
check(o);
|
|
foo(<warning descr="Argument 'o' might be null">o</warning>);
|
|
}
|
|
|
|
public static Object check(@Nullable final Object o) {
|
|
if (o != null && is()) {
|
|
}
|
|
return <warning descr="'null' is returned by the method which is not declared as @Nullable">null</warning>;
|
|
}
|
|
|
|
private static boolean is() {
|
|
System.out.println();
|
|
return true;
|
|
}
|
|
|
|
private static void foo(@NotNull final Object obj) {
|
|
}
|
|
} |