mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
InvertIfCondition: some fixes for non-compilable code
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Invert 'if' condition" "true"
|
||||
class A {
|
||||
public boolean foo() {
|
||||
if (!()) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Invert 'if' condition" "true"
|
||||
class A {
|
||||
public boolean foo() {
|
||||
if (!null) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Invert 'if' condition" "true"
|
||||
class A {
|
||||
public boolean foo() {
|
||||
if ((<caret>))
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Invert 'if' condition" "true"
|
||||
class A {
|
||||
public boolean foo() {
|
||||
if (n<caret>ull)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user