mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
29 lines
495 B
Java
29 lines
495 B
Java
import org.jetbrains.annotations.Contract;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
class Doo {
|
|
|
|
void foo(Throwable e) {
|
|
Throwable t = e;
|
|
|
|
while (t.getCause() != null) t = t.getCause();
|
|
if (e != t) {
|
|
System.out.println();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
abstract class Test04 {
|
|
@Nullable
|
|
@Contract(pure = true)
|
|
abstract Test04 getParent();
|
|
|
|
Test04 getTopParent() {
|
|
Test04 top = this;
|
|
while (top.getParent() != null) {
|
|
top = top.getParent();
|
|
}
|
|
return top;
|
|
}
|
|
} |