Dependency Injection issue when using ManagedMap or ManagedList in BeanDefinitionParser [SPR-11131] #15757
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
Chris Mathews opened SPR-11131 and commented
I just hit an issue when upgrading one of my projects from Spring 3.2.4 to 3.2.5. Here is the basic scenario simplified down to the core details:
@Inject
.I have tested this scenario from 3.0.0 all the way up to 3.2.4 and everything works as expected (4.0.0.M1 - M3 also work). When I upgrade to 3.2.5, 4.0.0.RC1 or 4.0.0-SNAPSHOT however things explode. The problem is that the Widget instances (inside the List) are no longer being injected upon. To be more exact only the first element (index 0) is not being injected upon... the rest of the Widget instances are being fully populated. This also only occurs when implemented as part of a custom namespace using ManagedMap and ManagedList to wire the appropriate Collections. If I wire the beans explicitly in Spring xml then everything works as expected.
Attached is a small sample project I threw together to demonstrate the problem.
Affects: 3.2.5, 4.0 RC1
Attachments:
Issue Links:
Referenced from: commits 242ecdc, d0fc38e
Backported to: 3.2.6
The text was updated successfully, but these errors were encountered: