mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
IDEA-175018 Unwrap if produces red code
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// "Unwrap 'if' statement" "true"
|
||||
class X {
|
||||
boolean f(int[] a) {
|
||||
if (a.length == 0) return false;
|
||||
if (a.length == 1) {
|
||||
System.out.println();
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
System.out.println("2");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Unwrap 'if' statement" "true"
|
||||
class X {
|
||||
boolean f(int[] a) {
|
||||
if (a.length == 0) return false;
|
||||
if (a.length == 1) {
|
||||
System.out.println();
|
||||
return true;
|
||||
}
|
||||
else if (a.<caret>length > 1) {
|
||||
System.out.println("2");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user