mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-23 18:03:06 +07:00
26 lines
697 B
Java
26 lines
697 B
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
class Test {
|
|
Object o;
|
|
|
|
void field() {
|
|
<warning descr="Method invocation 'o.hashCode()' may produce 'java.lang.NullPointerException'">o.hashCode()</warning>;
|
|
}
|
|
|
|
void parameter(Object o) {
|
|
<warning descr="Method invocation 'o.hashCode()' may produce 'java.lang.NullPointerException'">o.hashCode()</warning>;
|
|
}
|
|
|
|
void callUnknownMethod() {
|
|
<warning descr="Method invocation 'unknownObject().hashCode()' may produce 'java.lang.NullPointerException'">unknownObject().hashCode()</warning>;
|
|
}
|
|
|
|
void callNotNullMethod() {
|
|
knownObject().hashCode();
|
|
}
|
|
|
|
native Object unknownObject();
|
|
|
|
@NotNull
|
|
native Object knownObject();
|
|
} |