IDEA-136580 "Contract violation" warnings are reported for manual method contract

This commit is contained in:
peter
2015-02-16 12:13:26 +01:00
parent 36790d115c
commit 03ddd9dcea
3 changed files with 13 additions and 1 deletions
@@ -0,0 +1,11 @@
import org.jetbrains.annotations.Contract;
class Zoo {
@Contract("null, _ -> null; !null, _ -> !null")
public static Double testContract_1(Double value1, int value2) {
if (value1 == null) {
return null;
}
return 0.0;
}
}