mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-26 12:20:55 +07:00
17 lines
425 B
Java
17 lines
425 B
Java
// "Replace 'E1' with more generic 'E'" "true-preview"
|
|
class C {
|
|
static class E extends Exception { }
|
|
static class E1 extends E { }
|
|
|
|
static class MyResource implements AutoCloseable {
|
|
public MyResource() throws E1 { }
|
|
public void close() throws E { }
|
|
}
|
|
|
|
void f() {
|
|
try (MyResource r = new MyResource()) {
|
|
} catch (E e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
} |