infer nullity: more pessimistic check: check variables first (IDEA-114630)

This commit is contained in:
anna
2013-10-09 16:27:49 +02:00
parent 6fb01cd287
commit 93c8631bb4
3 changed files with 7 additions and 7 deletions
@@ -13,17 +13,17 @@ class Test {
@Nullable
String foo1(@Nullable String str) {
if (str == null);
if (str == null) return "null";
return (str);
}
@NotNull
@Nullable
String foo2(@Nullable String str) {
if (str == null);
if (str == null) return "null";
return ((String)str);
}
@NotNull
@Nullable
String fram(@Nullable String str, boolean b) {
if (str != null) {
return b ? str : "not null strimg";