Files
openide/java/java-tests/testData/inspection/dataFlow/contractCheck/InferredNotNull.java
T
Tagir Valeevandintellij-monorepo-bot ed5695c09f Contract inspection improved:
1. IDEA-236142 warn about inconsistent Contract/NotNull annotations
2. Localization of messages
3. Better messages

GitOrigin-RevId: 71add12d928cbc7234536c3746e9a97ec8c4c53f
2020-03-27 11:02:50 +00:00

10 lines
299 B
Java

import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
class Foo {
@Contract("<warning descr="Parameter 'foo' is inferred to be not-null, so 'null' is not applicable">null</warning> -> true")
public boolean test(Boolean foo) {
return foo.booleanValue();
}
}