Skip to content

Collection type resolver considering only lower bound of wildcard [SPR-5344] #10017

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

Closed
spring-projects-issues opened this issue Dec 8, 2008 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Tuomas Kiviaho opened SPR-5344 and commented

GenericCollectionTypeResolver.extractTypeFromParameterizedType seems to be returning lower bound of the wildcard. Hence DependencyDescriptor.getCollectionType for field List<? extends Shape> would return null instead of Shape. getCollectionType method seems to be only used with DefaultListableBeanFactory.findAutowireCandidates that matches against sub classes and wildcard usage as above doesn't seem to be working because Shape is upper bound of the wildcard.

Forum reference http://forum.springsource.org/showthread.php?p=215760


Affects: 2.5.6

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Thanks for raising this! As of 3.0 M2, we're checking both the upper bound and the lower bound, trying to make the best of it...

Juergen

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 M2 milestone Jan 11, 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) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants