mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-05 02:24:00 +07:00
GitOrigin-RevId: 05bdca159a63027ea0d1e3d767d4adb9b258f47e
15 lines
415 B
Java
15 lines
415 B
Java
import org.jetbrains.annotations.Contract;
|
|
|
|
class Zoo {
|
|
@Contract("null-><warning descr="Contract return value 'null': not applicable to constructor">null</warning>" )
|
|
Zoo(Object o) {}
|
|
|
|
@Contract("_->fail" )
|
|
<warning descr="Contract clause '_ -> fail' is violated: no exception is thrown">Zoo</warning>(int o) {}
|
|
|
|
@Contract("true->fail" )
|
|
Zoo(boolean o) {
|
|
if (o) throw new RuntimeException();
|
|
}
|
|
|
|
} |