blob: e37328e94cfbbaee0b6ca3923eaa771187869732 [file] [log] [blame]
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Nullable;
class Foo {
@Contract("null,_->true")
boolean bar(@Nullable Object foo, int i) {
if (foo == null) {
<warning descr="Contract clause 'null, _ -> true' is violated: exception might be thrown instead of returning true">throw new RuntimeException();</warning>
}
return i == 2;
}
}