Java: Infer nullability annotations for extracted method's parameters (IDEA-150243)

This commit is contained in:
Pavel Dolgov
2017-06-19 12:54:10 +03:00
parent 99bbe2e66e
commit f060340474
18 changed files with 483 additions and 4 deletions
@@ -0,0 +1,20 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
class C {
void f(@Nullable Object o, boolean b) {
while (o != null) {
if (b) {
o = 7;
}
newMethod(o);
}
}
private void newMethod(@NotNull Object o) {
g(o);
}
void g(Object o) {
}
}