mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user