mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-73344: Writing unknown value to a nullable variable must reset it's nullability status to unknown, rather than nullable.
This commit is contained in:
@@ -504,7 +504,7 @@ public class DfaMemoryStateImpl implements DfaMemoryState {
|
||||
DfaTypeValue dfaType = (DfaTypeValue)dfaCond.getRightOperand();
|
||||
|
||||
final DfaVariableState varState = getVariableState(dfaVar);
|
||||
varState.setNullable(varState.isNullable() || dfaType.isNullable());
|
||||
varState.setNullable(dfaType.isNullable());
|
||||
return !isNotNull(dfaVar) || varState.setInstanceofValue(dfaType);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Npe {
|
||||
o.hashCode(); // NPE
|
||||
}
|
||||
|
||||
Object foo() {
|
||||
@Nullable Object foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user