mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
Do not assume that Object is assignable from any class
Class could be a primitive Fixes IDEA-232014 False positive `Constant conditions & exceptions` inspection for `Class#isAssignableFrom(Class)` GitOrigin-RevId: 4db7cfa10a0d2b8a2476f434db82d04d7a62cd38
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b91599f50f
commit
9be22ca7e7
@@ -939,7 +939,7 @@ public class StandardInstructionVisitor extends InstructionVisitor {
|
||||
ArrayList<DfaInstructionState> states = new ArrayList<>(2);
|
||||
DfType leftType = memState.getDfType(dfaLeft);
|
||||
if (condition == DfaCondition.getUnknown()) {
|
||||
if (dfaLeft instanceof DfaTypeValue && dfaRight instanceof DfaTypeValue) {
|
||||
if (leftType != TOP && dfaLeft instanceof DfaTypeValue && dfaRight instanceof DfaTypeValue) {
|
||||
TypeConstraint left = TypeConstraint.fromDfType(leftType);
|
||||
TypeConstraint right = TypeConstraint.fromDfType(dfaRight.getDfType());
|
||||
useful = !right.isSuperConstraintOf(left);
|
||||
|
||||
Reference in New Issue
Block a user