DfaMemoryStateImpl: Avoid SOE when canonicalizing rewritten temp variable

Fixes EA-136794 - NA: DfaMemoryStateImpl.replaceQualifier
This commit is contained in:
Tagir Valeev
2019-02-15 17:02:32 +07:00
parent 8afae03688
commit b8c6d1f4fe
3 changed files with 22 additions and 1 deletions
@@ -0,0 +1,19 @@
import java.util.*;
import java.util.function.*;
class X {
Optional<Optional<?>> opt1;
void test(int i) {
Optional<?> res = ((Supplier<Optional<?>>)() -> {
try {
if (opt1.get() == opt1) {
return opt1;
}
}
finally {
return Optional.empty();
}
}).get();
if(<warning descr="Condition 'res.isPresent()' is always 'false'">res.isPresent()</warning>) {}
}
}