mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
AddExceptionToExistingCatch: fix collecting try statements IDEA-CR-30935
This commit is contained in:
-18
@@ -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
-1
@@ -1,4 +1,4 @@
|
||||
// "Add exception to existing catch clause" "true"
|
||||
// "Add exception to existing catch clause" "false"
|
||||
import java.io.FileInputStream;
|
||||
|
||||
class Test {
|
||||
|
||||
+14
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user