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

Type information not available on NoSuchBeanDefinitionException for collections [SPR-14831] #19397

Closed
spring-projects-issues opened this issue Oct 20, 2016 · 6 comments

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 20, 2016

Madhura Bhave opened SPR-14831 and commented

The original issue is in Spring Boot (spring-projects/spring-boot#6996). It would be helpful to get the type parameter for the NoSuchBeanDefinitionException for collections/maps to provide better failure analysis.


Affects: 4.3.3

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 21, 2016

Stéphane Nicoll commented

I've a candidate fix in 522518f but I am not sure about the changes in DefaultListableBeanFactory. The logic of DepedencyDescriptor#getDependencyType() vs. DependencyDescriptor#getResolvableType().getRawClass() can lead to some sort of regressions.

Juergen Hoeller is that what you had in mind? I am feeling slightly nervous about that change now...

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2016

Stéphane Nicoll commented

Juergen Hoeller I've polished my initial proposal and I think it's more in line with what we've discussed. I went ahead and merged that to master in b7d85f8. Can you please review and backport to 4.3?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2016

Phil Webb commented

Reopening for 4.3 backport

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2016

Phil Webb commented

Also this line causes a NPE if the type is null.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 24, 2016

Stéphane Nicoll commented

Good catch, fixed the NPE.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 27, 2016

Juergen Hoeller commented

I've revised this a bit for 5.0 now (with streamlined constructors) and will backport a 4.3 variant tomorrow (keeping a deprecated constructor with a dependency String argument).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants