mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 00:50:53 +07:00
22 lines
441 B
Java
22 lines
441 B
Java
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class C {
|
|
void foo(@Nullable Object o) {
|
|
if (o != null)
|
|
newMethod(o).run();
|
|
}
|
|
|
|
@NotNull
|
|
private Runnable newMethod(@NotNull Object o) {
|
|
return new Runnable() {
|
|
@Override
|
|
public void run() {
|
|
bar(o);
|
|
}
|
|
};
|
|
}
|
|
|
|
void bar(@NotNull Object o) {
|
|
}
|
|
} |