mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
Java: Infer nullability of extracted method's parameter in presence of a lambda or an anonymous class (IDEA-175727)
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class C {
|
||||
void foo(@Nullable Object o) {
|
||||
while (o != null)
|
||||
newMethod(o).run();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private Runnable newMethod(@NotNull Object o) {
|
||||
return (Runnable)(() -> bar(o));
|
||||
}
|
||||
|
||||
void bar(@NotNull Object o) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user