IDEA-66266 (add/remove modifier quick fix to work on explicit ones only)

This commit is contained in:
Roman Shevchenko
2011-03-07 22:01:52 +01:00
parent a9c8cd157b
commit 20b933ac87
6 changed files with 55 additions and 4 deletions
@@ -0,0 +1,12 @@
// "Make 'e' not final" "false"
class C {
static {
try {
throw new Exception();
}
catch (RuntimeException | IOException e) {
<caret>e = null;
}
}
}
@@ -0,0 +1,9 @@
// "Make 'r' not final" "false"
class C {
void m() throws Exception {
try (AutoCloseable r = null) {
<caret>r = null;
}
}
}
@@ -0,0 +1,16 @@
// "Make 'e' final" "false"
class C {
static {
try {
throw new Exception();
}
catch (RuntimeException | IOException e) {
new Runnable() {
public void run() {
System.out.println(<caret>e);
}
}.run();
}
}
}
@@ -0,0 +1,13 @@
// "Make 'r' final" "false"
class C {
void m() throws Exception {
try (AutoCloseable r = null) {
new Runnable() {
public void run() {
System.out.println(<caret>r);
}
}.run();
}
}
}