mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-24 04:07:09 +07:00
24 lines
487 B
Java
24 lines
487 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class FooWithComments {
|
|
void unimportantMethod() {
|
|
AnEnum ae = nullableGetter();
|
|
if (ae != null) {
|
|
if (ae == AnEnum.ENUM_VALUE) {
|
|
anotherMethod(ae.name()); // IDEA warns that ae.name() could cause NPE
|
|
} else {
|
|
// do something else
|
|
}
|
|
}
|
|
}
|
|
|
|
private native void anotherMethod(String name);
|
|
|
|
@Nullable
|
|
private native AnEnum nullableGetter();
|
|
|
|
enum AnEnum {
|
|
ENUM_VALUE, FOO2
|
|
}
|
|
}
|