mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 04:11:31 +07:00
14 lines
397 B
Java
14 lines
397 B
Java
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="Return value of clause 'null, _ -> true' could be replaced with 'fail' as method always fails in this case">throw new RuntimeException();</warning>
|
|
}
|
|
return i == 2;
|
|
}
|
|
|
|
}
|