mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 06:39:38 +07:00
[java-dfa] Equality of DfaWrappedValue does not mean the total equality
GitOrigin-RevId: 8c1faec2cd6c5cbdd7b89f442cb46e2bf3ebd951
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c6f8b35d04
commit
c3a343e08b
@@ -931,7 +931,7 @@ public class DfaMemoryStateImpl implements DfaMemoryState {
|
||||
}
|
||||
}
|
||||
|
||||
if (dfaLeft == dfaRight) {
|
||||
if (dfaLeft == dfaRight && !(dfaLeft instanceof DfaWrappedValue)) {
|
||||
return !isNegated || (dfaLeft instanceof DfaVariableValue && ((DfaVariableValue)dfaLeft).containsCalls());
|
||||
}
|
||||
|
||||
|
||||
@@ -88,11 +88,15 @@ class StringSubstring {
|
||||
if (<warning descr="Condition 's2.length() != 4' is always 'false'">s2.length() != 4</warning>) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void testSubstringVarRef(String s, int from, int length) {
|
||||
String s1 = s.substring(0, length);
|
||||
if (<warning descr="Condition 's1.length() == length' is always 'true'">s1.length() == length</warning>) {}
|
||||
String s2 = s.substring(from, from + length);
|
||||
if (<warning descr="Condition 's2.length() == length' is always 'true'">s2.length() == length</warning>) {}
|
||||
}
|
||||
|
||||
public static boolean testSubstringEquals(String s1, String s2, int idx) {
|
||||
return s1.substring(0, idx).equals(s2.substring(0, idx));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user