mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 12:17:12 +07:00
`throw e` won't fix the compilation error, comment - is not really better than empty catch block. GitOrigin-RevId: ea002c332900b032392e766f3dd13fe3258ad49c
15 lines
369 B
Java
15 lines
369 B
Java
// "Add 'catch' clause(s)" "true"
|
|
import java.io.IOException;
|
|
|
|
class Test {
|
|
static class MyResource implements AutoCloseable {
|
|
public void close() throws IOException { }
|
|
}
|
|
|
|
void m() {
|
|
try (MyResource r = new MyResource()) {
|
|
} catch (IOException e) {
|
|
<selection>throw new RuntimeException(e);</selection>
|
|
}
|
|
}
|
|
} |