mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
Java: Infer nullability annotations for extracted method's parameters (IDEA-150243)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class C {
|
||||
void f() {
|
||||
I i = (@Nullable String o) -> {
|
||||
if (o != null) {<selection>
|
||||
if (o instanceof String) {
|
||||
o = "4";
|
||||
}
|
||||
else {
|
||||
System.out.println(o);
|
||||
}
|
||||
g(o);</selection>
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
void g(@NotNull Object o) {
|
||||
}
|
||||
|
||||
interface I<T, R> {
|
||||
R m(T t);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user