Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/after1.java
2011-03-01 20:34:18 +01:00

17 lines
463 B
Java

// "Surround with try/catch" "true"
class C {
static class E1 extends Exception { }
static class MyResource implements AutoCloseable {
public void close() throws E1 { }
}
void m() {
try {
try (MyResource r = new MyResource()) {
}
} catch (E1 e1) {
<selection>e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.</selection>
}
}
}