Calling method with contract shouldn't result in nullability suspicion (IDEA-113763, IDEA-113699, almost IDEA-113143)

This commit is contained in:
peter
2013-09-19 18:32:08 +02:00
parent f2a563b9f8
commit 340cf22371
8 changed files with 105 additions and 2 deletions
@@ -47,6 +47,7 @@ public class DfaMemoryStateImpl implements DfaMemoryState {
private final TLongHashSet myDistinctClasses = new TLongHashSet();
private final THashMap<DfaVariableValue,DfaVariableState> myVariableStates = new THashMap<DfaVariableValue, DfaVariableState>();
private final THashSet<DfaVariableValue> myUnknownVariables = new THashSet<DfaVariableValue>();
private boolean myEphemeral;
public DfaMemoryStateImpl(final DfaValueFactory factory) {
myFactory = factory;
@@ -85,6 +86,7 @@ public class DfaMemoryStateImpl implements DfaMemoryState {
if (!(obj instanceof DfaMemoryStateImpl)) return false;
DfaMemoryStateImpl that = (DfaMemoryStateImpl)obj;
if (myEphemeral != that.myEphemeral) return false;
if (myDistinctClasses.size() != that.myDistinctClasses.size()) return false;
if (myStack.size() != that.myStack.size()) return false;
if (myOffsetStack.size() != that.myOffsetStack.size()) return false;
@@ -506,6 +508,16 @@ public class DfaMemoryStateImpl implements DfaMemoryState {
return result;
}
@Override
public void markEphemeral() {
myEphemeral = true;
}
@Override
public boolean isEphemeral() {
return myEphemeral;
}
@Override
public boolean applyInstanceofOrNull(DfaRelationValue dfaCond) {
DfaValue left = dfaCond.getLeftOperand();