mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
18 lines
375 B
Java
18 lines
375 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class Npe {
|
|
|
|
void foo(@Nullable SomeInterface x) {
|
|
((SomeInterfaceImpl)x).<warning descr="Method invocation 'bar' may produce 'NullPointerException'">bar</warning>();
|
|
}
|
|
|
|
interface SomeInterface {
|
|
void bar();
|
|
}
|
|
|
|
class SomeInterfaceImpl implements SomeInterface {
|
|
@Override
|
|
public void bar() {
|
|
}
|
|
}
|
|
} |