AddExceptionToExistingCatch: disable fix for local classes: IDEA-189828

This commit is contained in:
Roman.Ivanov
2018-04-10 15:49:24 +07:00
parent db891c3f24
commit 5e0d5a8c16
5 changed files with 57 additions and 3 deletions
@@ -0,0 +1,18 @@
// "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();
}
}
}
@@ -0,0 +1,17 @@
// "Add exception to existing catch clause" "true"
import java.io.FileInputStream;
class Test {
void m() {
try {
new Runnable() {
@Override
public void run() { }
InputStream in = new <caret>FileInputStream("");
};
} catch (RuntimeException e) {
e.printStackTrace();
}
}
}
@@ -0,0 +1,17 @@
// "Add exception to existing catch clause" "false"
import java.io.FileInputStream;
class Test {
void m() {
try {
class A implements Runnable {
@Override
public void run() { }
InputStream in = new <caret>FileInputStream("");
};
} catch (RuntimeException e) {
e.printStackTrace();
}
}
}