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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3285 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2010-04-21 20:06:38 +00:00
parent 33bbd4f5fd
commit 64228e966c
2 changed files with 15 additions and 2 deletions
@@ -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");