当基类具有与派生类具有相同名称和参数的私有方法时,IntelliJ似乎感到困惑。
static class A {
private void a() {
}
}
static class B extends A {
void a() throws InterruptedException {
}
void b() {
try {
a();
} catch (InterruptedException e) {
// can't catch here
// IntelliJ is not happy
}
}
}
是的,这种行为是一个错误。它将被修复。
披露:我是IntelliJ IDEA开发人员,负责相应的子系统。