InjectionPoint not propagated by AutowiredAnnotationBeanPostProcessor's cached argument resolution [SPR-14400] #18971
When there is a prototype bean with a field annotated with
If I execute the test then I get the following log:
The lines 16:36:54.757 and 16:36:54.758 in the log show that the InjectionPoint of the Logger field differs, because the injection point's member declaring class is used to instantiate the logger. I would expect that they don't differ because both times the same bean is instantiated.
After a closer look I recognized that the second logger is instantiated for the test class MyTest, so I assume that the injection point isn't populated recursively. To prove my assumption I created the method
This log confirmed my assumption from above, because now there isn't a parent injection point and the thrown error state that there isn't an current injection point at all. I guess the that the method
I have attached a maven project so that you are able to reproduce the observed behavior.
Affects: 4.3 GA
Referenced from: commits e15f7ef
The text was updated successfully, but these errors were encountered:
Juergen Hoeller commented
This was caused by
This will be available in the upcoming