mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 09:47:51 +07:00
14 lines
329 B
Java
14 lines
329 B
Java
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class Npe {
|
|
void bar() {
|
|
final @Nullable Object o = foo();
|
|
o.<warning descr="Method invocation 'hashCode' may produce 'NullPointerException'">hashCode</warning>(); // NPE
|
|
}
|
|
|
|
@Nullable Object foo() {
|
|
return null;
|
|
}
|
|
}
|