Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResolvableType.forRawClass fails isAssignable against TypeVariable #23321

Closed
philwebb opened this issue Jul 20, 2019 · 0 comments
Closed

ResolvableType.forRawClass fails isAssignable against TypeVariable #23321

philwebb opened this issue Jul 20, 2019 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@philwebb
Copy link
Member

A ResolvableType created using forRawClass incorrectly returns false when isAssignable is called against a type backed by a TypeVariable.

E.g.: Given the following type:

public static class ExtendedList extends List<CharSequence> {
}

This code will result in false when it should be true:

ResolvableType.forRawClass(CharSequence.class).isAssignableFrom(ResolvableType.forClass(ExtendsList.class).as(List.class).getGeneric());
@philwebb philwebb added this to the 5.2 RC1 milestone Jul 20, 2019
@philwebb philwebb added the type: bug A general bug label Jul 20, 2019
@philwebb philwebb self-assigned this Jul 20, 2019
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.0.x labels Jul 20, 2019
@philwebb philwebb modified the milestones: 5.2 RC1, 5.1.9 Jul 20, 2019
@jhoeller jhoeller added the in: core Issues in core modules (aop, beans, core, context, expression) label Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants