Issue Details (XML | Word | Printable)

Key: SPR-4456
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Critical Critical
Assignee: Juergen Hoeller
Reporter: David J. M. Karlsen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Framework

Weird autowiring bug

Created: 12/Feb/08 09:06 AM   Updated: 15/Feb/08 05:36 AM
Component/s: SpringCORE
Affects Version/s: 2.5.1
Fix Version/s: 2.5.2

Time Tracking:
Not Specified

File Attachments: 1. Java Source File ApplicationContextReaderImpl.java (8 kB)

Environment: N/A
Issue Links:
Duplicate
 

Virtual Machine: IBM JVM


 Description  « Hide
Please se attached class ApplicationContextReaderImpl.java .
Testcase:
We tried to get this class @Autowired into a consumer of the class (The consumer declares @Autowired on the interface).

Observations:
1) If used as is - Spring finds no match (expecting 1 unique bean - finds none).
2) If it's not defined in the spring context as a @Component but defined in xml - it will be found!
3) If the inner Cache class is defined as a static class - autowiring ( 1) ) will succeed.

So this clearly has to be an autowiring bug.



 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
David J. M. Karlsen added a comment - 12/Feb/08 09:09 AM
Testcase

Juergen Hoeller added a comment - 15/Feb/08 05:36 AM
This should already be fixed in recent 2.5.2 snapshots (http://static.springframework.org/downloads/nightly/snapshot-download.php?project=SPR). Feel free to give it a try...

Juergen