Accept nested array type for upUntilUnresolvable check as well

Closes gh-33535
This commit is contained in:
Juergen Hoeller
2024-09-17 16:20:54 +02:00
parent 383fa43ded
commit 20bc5ef68b
3 changed files with 31 additions and 5 deletions

View File

@@ -319,17 +319,18 @@ public class ResolvableType implements Serializable {
}
}
if (upUntilUnresolvable && (other.isUnresolvableTypeVariable() || other.isWildcardWithoutBounds())) {
return true;
}
// Deal with array by delegating to the component type
if (isArray()) {
return (other.isArray() && getComponentType().isAssignableFrom(
other.getComponentType(), true, matchedBefore, upUntilUnresolvable));
}
if (upUntilUnresolvable && (other.isUnresolvableTypeVariable() || other.isWildcardWithoutBounds())) {
return true;
}
boolean exactMatch = (strict && matchedBefore != null); // We're checking nested generic variables now...
// We're checking nested generic variables now...
boolean exactMatch = (strict && matchedBefore != null);
// Deal with wildcard bounds
WildcardBounds ourBounds = WildcardBounds.get(this);