mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
Java: Merged ConfusingElseInspection and RemoveRedundantElseAction into RedundantElseInspection, made it an INFORMATION-level inspection (IDEA-162191)
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Remove redundant 'else'" "true"
|
||||
class T {
|
||||
static void foo(boolean something) {
|
||||
if (something) {
|
||||
return;
|
||||
} // a
|
||||
System.out.println(); // b
|
||||
// c
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Remove redundant 'else'" "true"
|
||||
class T {
|
||||
void three(boolean b) {
|
||||
switch (3) {
|
||||
case 2:
|
||||
if (foo()) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
case 3:
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Remove redundant 'else'" "true"
|
||||
class T {
|
||||
static void foo(boolean something) {
|
||||
if (something) {
|
||||
return;
|
||||
}
|
||||
else<caret> { // a
|
||||
System.out.println(); // b
|
||||
// c
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Remove redundant 'else'" "true"
|
||||
class T {
|
||||
void three(boolean b) {
|
||||
switch (3) {
|
||||
case 2:
|
||||
if (foo()) {
|
||||
return;
|
||||
}
|
||||
else<caret> {
|
||||
return;
|
||||
}
|
||||
case 3:
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user