mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
DFA: ignore boolean fields initializer if it's true or false literal
Often it's used as a knob to switch program behavior, so it's reasonable to analyze both alternatives
This commit is contained in:
+1
-2
@@ -1,8 +1,7 @@
|
||||
// "Unwrap 'if' statement" "true"
|
||||
class X {
|
||||
private final boolean field = true;
|
||||
|
||||
String m() {
|
||||
boolean field = true;
|
||||
return "one";
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
// "Unwrap 'if' statement" "true"
|
||||
class X {
|
||||
private final boolean field = true;
|
||||
|
||||
String m() {
|
||||
boolean field = true;
|
||||
if (fiel<caret>d) return "one";
|
||||
return "two";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user