mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-246334 Follow-up: do not use computeCastTo for null type
GitOrigin-RevId: 8aca68da4752e752cb92efd02503abbef7fd02da
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5c63dd413a
commit
bccd2c49a5
@@ -56,7 +56,8 @@ final class DfaBasedFilter {
|
||||
DfConstantType<?> dfConstantType = (DfConstantType<?>)myDfType;
|
||||
Object constValue = dfConstantType.getValue();
|
||||
if (!(constValue instanceof PsiElement)) {
|
||||
Object value = TypeConversionUtil.computeCastTo(((PsiLiteralValue)element).getValue(), dfConstantType.getPsiType());
|
||||
Object literalValue = ((PsiLiteralValue)element).getValue();
|
||||
Object value = constValue == null ? literalValue : TypeConversionUtil.computeCastTo(literalValue, dfConstantType.getPsiType());
|
||||
return Objects.equals(value, constValue);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user