mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
dfa: fix & treatment
This commit is contained in:
+1
-1
@@ -1163,7 +1163,7 @@ class ControlFlowAnalyzer extends JavaElementVisitor {
|
||||
|
||||
if (!shortCircuit) {
|
||||
if (i > 0) {
|
||||
combineStackBooleans(false, operand);
|
||||
combineStackBooleans(true, operand);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -36,9 +36,4 @@
|
||||
<description>Condition <code>o</code> at the left side of assignment expression is always <code>false</code>. Can be simplified to normal assignment.</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>52</line>
|
||||
<description>Condition <code>o</code> is always <code>true</code></description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
|
||||
int foo(String d1, String d2) {
|
||||
@@ -7,7 +9,7 @@ class X {
|
||||
|
||||
}
|
||||
void foo2(String d1, String d2) {
|
||||
if(<warning descr="Condition 'd1 == null & d1 != null' is always 'true'">d1 == null & d1 != null</warning>)
|
||||
if(<warning descr="Condition 'd1 == null & d1 != null' is always 'false'">d1 == null & d1 != null</warning>)
|
||||
System.out.println("impossible");
|
||||
|
||||
}
|
||||
@@ -17,3 +19,16 @@ class X {
|
||||
}
|
||||
}
|
||||
|
||||
class Doo {
|
||||
|
||||
void zoo(@NotNull Object t, @NotNull Object s) {
|
||||
}
|
||||
|
||||
|
||||
private void goo(Object t, Object t2) {
|
||||
if (t != null & t2 != null) {
|
||||
zoo(t, t2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user