mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 00:19:11 +07:00
GitOrigin-RevId: 6ca85640d4d20ca72b7262a7a8f1733ee60ffa07
27 lines
591 B
Java
27 lines
591 B
Java
import org.junit.jupiter.api.*;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class Contracts {
|
|
|
|
void foo(@Nullable Object o) {
|
|
Assertions.assertNotNull(o);
|
|
String s = o.toString();
|
|
}
|
|
|
|
void foo2(@Nullable Object o) {
|
|
Assertions.assertNotNull(o, "message");
|
|
String s = o.toString();
|
|
}
|
|
|
|
void foo3(java.util.function.BooleanSupplier o) {
|
|
Assertions.assertTrue(o, "message");
|
|
}
|
|
|
|
void foo3(boolean b) {
|
|
Assertions.assertTrue(b, "message");
|
|
if (<warning descr="Condition '!b' is always 'false'">!b</warning>) {
|
|
System.out.println("how?");
|
|
}
|
|
}
|
|
|
|
} |