mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
23 lines
342 B
Java
23 lines
342 B
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
class C {
|
|
Object foo(boolean b) {
|
|
if (b) {
|
|
return newMethod();
|
|
} else {
|
|
return newMethod();
|
|
}
|
|
}
|
|
|
|
@NotNull
|
|
private Object newMethod() {
|
|
return A.getInstance();
|
|
}
|
|
}
|
|
class A {
|
|
static A getInstance() {
|
|
return new A();
|
|
}
|
|
}
|
|
class B extends A {
|
|
} |