mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
36 lines
877 B
Java
36 lines
877 B
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
class Test {
|
|
Object o;
|
|
|
|
void field() {
|
|
o.<warning descr="Method invocation 'hashCode' may produce 'NullPointerException' (unknown nullability)">hashCode</warning>();
|
|
}
|
|
|
|
void parameter(Object o) {
|
|
o.<warning descr="Method invocation 'hashCode' may produce 'NullPointerException' (unknown nullability)">hashCode</warning>();
|
|
}
|
|
|
|
void callUnknownMethod() {
|
|
unknownObject().<warning descr="Method invocation 'hashCode' may produce 'NullPointerException' (unknown nullability)">hashCode</warning>();
|
|
}
|
|
|
|
void callNotNullMethod() {
|
|
knownObject().hashCode();
|
|
}
|
|
|
|
native Object unknownObject();
|
|
|
|
@NotNull
|
|
native Object knownObject();
|
|
}
|
|
|
|
enum DemoEnum {
|
|
TEST, DEMO, DEMO_1;
|
|
|
|
public static DemoEnum testMethod(String value){
|
|
for (DemoEnum demoEnum : DemoEnum.values()) {
|
|
}
|
|
return null;
|
|
}
|
|
} |