Replace isAssignableFrom() with isInstance() where feasible

Closes gh-36899

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
Yanming Zhou
2026-06-15 15:16:18 +02:00
committed by GitHub
parent 0c60266986
commit cdc3c52640
31 changed files with 37 additions and 47 deletions
@@ -72,7 +72,7 @@ public class OperatorInstanceof extends Operator {
result = BooleanTypedValue.FALSE; // null is not an instanceof anything
}
else {
result = BooleanTypedValue.forValue(rightClass.isAssignableFrom(leftValue.getClass()));
result = BooleanTypedValue.forValue(rightClass.isInstance(leftValue));
}
this.type = rightClass;
if (rightOperand instanceof TypeReference) {