Files
openide/java/java-tests/testData/refactoring/extractMethod/SkipThrowsDeclaredInLambda_after.java

24 lines
425 B
Java

import java.io.IOException;
class Issue {
public static void main(String[] args) {
newMethod();
}
private static void newMethod() {
swallow(() -> {
throw new IOException();
});
}
private static void swallow(ThrowsUnchecked r) {
try {
r.doAction();
} catch (IOException ignored) {
}
}
}
interface ThrowsUnchecked {
void doAction() throws IOException;
}