getBeanNamesForType(ResolvableType) doesn't work for raw singleton instance from @Bean method with generic return type [SPR-17524] #22056
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
Konstantin opened SPR-17524 and commented
When calling
beanFactory.getBeanNamesForType
with ResolvableType.forClassWithGenerics(), if bean is lazy it works, after initialization or bean not lazy this code will not work.Here's a case, all asserts return true:
Affects: 5.1.2
Issue Links:
Referenced from: pull request #2027, and commits ebbe14c, e9f7c35, 7b2eebe
Backported to: 5.0.11, 4.3.21
The text was updated successfully, but these errors were encountered: