IDEA-207296 Good code red: exception never thrown in the corresponding try block

This commit is contained in:
Tagir Valeev
2019-02-22 17:07:27 +07:00
parent 8b8a8696d5
commit 8b03dc8d47
2 changed files with 24 additions and 0 deletions
@@ -10,4 +10,22 @@ class x {
catch (<error descr="Exception 'java.io.IOException' is never thrown in the corresponding try block">IOException e</error>) {
}
}
}
//////////////////
class A {
private void a() {
}
}
class B extends A {
void a() throws InterruptedException {
}
void b() {
try {
a();
} catch (InterruptedException e) {
// IDEA-207296
}
}
}