|
From: Rolf K. <ma...@ro...> - 2004-12-23 17:59:34
|
Hi list, I developed a small app using Spring 1.1.1, 1.1.2 and now 1.1.3. Since 1.1.3 some test of my app fail. You can download a test case to reproduce this with Spring 1.1.3 from http://www.apache.org/~roku/spring-factory-beans-test.zip . Just add the sources to the Spring test folder and run the test(s). I want to give a small overview of the problem: bean config: <beans> <bean id="peopleFactory" class="org.springframework.beans.PeopleFactoryImpl" factory-method="getInstance"/> <bean id="person" class="org.springframework.beans.Person" factory-bean="peopleFactory" factory-method="getPerson"/> </beans> Getting the first bean via BeanFactory is no problem. Getting the second bean is not working in 1.1.3 anymore. I debugged the Spring sources a bit and the problem really seems to be a bug. The offending statement is in class AbstractAutowireCapableBeanFactory line 381: for (int i = 0; i < factoryClass.getMethods().length; i++) { The variable factoryClass is null, since the method getType(..) invoked in line 372 returns null. Please see that method for further details. Looking at this class in Spring 1.1.2 shows the difference. Unfortunately I have no patch available. Maybe it isnt' a bug anyway. Please have a look. Thanks and I wish a happy new new year. -- Rolf Kulemann |