IDEA-85035 Wrong "possible NPE" warning

This commit is contained in:
peter
2012-04-23 15:58:21 +02:00
parent 9c2e2c691e
commit f0d7a0d5a6
3 changed files with 27 additions and 10 deletions
@@ -595,16 +595,6 @@ public class DfaMemoryStateImpl implements DfaMemoryState {
}
if (dfaRight instanceof DfaNotNullValue) {
if (dfaLeft instanceof DfaVariableValue) {
DfaVariableState varState = getVariableState((DfaVariableValue)dfaLeft);
DfaVariableValue dfaVar = (DfaVariableValue)dfaLeft;
DfaTypeValue type = myFactory.getTypeFactory().create(((DfaNotNullValue)dfaRight).getType());
if (isNegated) {
return applyCondition(myFactory.getRelationFactory().create(dfaVar, DfaUnknownValue.getInstance(), JavaTokenType.EQEQ, false));
}
return applyCondition(compareToNull(dfaVar, false)) && varState.setInstanceofValue(type);
}
return true;
}