AddExceptionToExistingCatch: fix collecting try statements IDEA-CR-30935

This commit is contained in:
Roman.Ivanov
2018-05-22 15:47:32 +07:00
parent f77adeb1d6
commit 7504c18421
4 changed files with 36 additions and 40 deletions
@@ -1,18 +0,0 @@
// "Add exception to existing catch clause" "true"
import java.io.FileInputStream;
import java.io.FileNotFoundException;
class Test {
void m() {
try {
new Runnable() {
@Override
public void run() { }
InputStream in = new FileInputStream("");
};
} catch (RuntimeException | FileNotFoundException e) {
e.printStackTrace();
}
}
}
@@ -1,4 +1,4 @@
// "Add exception to existing catch clause" "true"
// "Add exception to existing catch clause" "false"
import java.io.FileInputStream;
class Test {
@@ -0,0 +1,14 @@
// "Add exception to existing catch clause" "false"
import java.io.File;
class Test {
void test() {
try { }
catch (Error ex) {
try { }
catch (RuntimeException ex2) {
Class.forName<caret>("xyz");
}
}
}
}