mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-01 09:04:15 +07:00
21 lines
447 B
Java
21 lines
447 B
Java
class Test {
|
|
|
|
@org.jetbrains.annotations.Contract("null->false")
|
|
public static boolean smth(Object context) {
|
|
if (someMethodWithUnknownContract(context)) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private static native boolean someMethodWithUnknownContract(Object o);
|
|
|
|
private volatile boolean field;
|
|
@org.jetbrains.annotations.Contract("->fail")
|
|
void fail() {
|
|
if (field) {
|
|
}
|
|
throw new AssertionError();
|
|
}
|
|
|
|
} |