introspect decorated definition for getType calls as well (SPR-7006)

This commit is contained in:
Juergen Hoeller
2010-04-21 20:06:38 +00:00
parent 3dbe38e418
commit 4cab4a7545
2 changed files with 15 additions and 2 deletions

View File

@@ -46,7 +46,6 @@ import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.BeanDefinitionDecorator;
@@ -68,6 +67,7 @@ import org.springframework.core.io.Resource;
* @author Rob Harrop
* @author Rick Evans
* @author Chris Beams
* @author Juergen Hoeller
*/
public class CustomNamespaceHandlerTests {
@@ -120,6 +120,7 @@ public class CustomNamespaceHandlerTests {
public void testProxyingDecoratorNoInstance() throws Exception {
String[] beanNames = this.beanFactory.getBeanNamesForType(ApplicationListener.class);
assertTrue(Arrays.asList(beanNames).contains("debuggingTestBeanNoInstance"));
assertEquals(ApplicationListener.class, this.beanFactory.getType("debuggingTestBeanNoInstance"));
try {
this.beanFactory.getBean("debuggingTestBeanNoInstance");
fail("Should have thrown BeanCreationException");