nullity: skip assert statements for local vars - should be possible to detect from usages; use in prams nullification (IDEA-60705)

This commit is contained in:
anna
2010-11-11 14:17:58 +03:00
parent 76c393a145
commit c191be3cc3
4 changed files with 43 additions and 0 deletions
@@ -0,0 +1,14 @@
import org.jetbrains.annotations.NotNull;
class Test {
@NotNull
public String noNull(@NotNull String text) {
assert text != null;
return "";
}
private void foo() {
@NotNull String str = "";
assert str != null;
}
}
@@ -0,0 +1,11 @@
class Test {
public String noNull(String text) {
assert text != null;
return "";
}
private void foo() {
String str = "";
assert str != null;
}
}