Fix ResolvableType raw class isAssignable checks

Fix `isAssignable` for `ResolvableType.forRawClass` so that it can be
used with types backed by a `TypeVarible`. Prior to this commit the
rawClass value was used, which wouldn't always work.

Closes gh-23321
This commit is contained in:
Phillip Webb
2019-07-20 13:16:07 +01:00
parent f92b60c08f
commit e5bef10d85
2 changed files with 13 additions and 1 deletions

View File

@@ -1015,7 +1015,7 @@ public class ResolvableType implements Serializable {
}
@Override
public boolean isAssignableFrom(ResolvableType other) {
Class<?> otherClass = other.getRawClass();
Class<?> otherClass = other.resolve();
return (otherClass != null && (clazz == null || ClassUtils.isAssignable(clazz, otherClass)));
}
};