mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-28 15:20:54 +07:00
15 lines
377 B
Java
15 lines
377 B
Java
// "Add 'catch' clause(s)" "true-preview"
|
|
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>
|
|
}
|
|
}
|
|
} |