Fixed side effect on other tests

Issue: SPR-10459
This commit is contained in:
Juergen Hoeller 2014-08-08 17:02:59 +02:00
parent c1d149591a
commit 47006eeff1
2 changed files with 2 additions and 3 deletions

View File

@ -159,8 +159,8 @@ public class ComponentScanAnnotationIntegrationTests {
@Test @Test
public void withCustomTypeFilter() { public void withCustomTypeFilter() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ComponentScanWithCustomTypeFilter.class); AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ComponentScanWithCustomTypeFilter.class);
assertFalse(ctx.getDefaultListableBeanFactory().containsSingleton("kustomBean")); assertFalse(ctx.getDefaultListableBeanFactory().containsSingleton("componentScanParserTests.KustomAnnotationAutowiredBean"));
KustomAnnotationAutowiredBean testBean = ctx.getBean("kustomBean", KustomAnnotationAutowiredBean.class); KustomAnnotationAutowiredBean testBean = ctx.getBean("componentScanParserTests.KustomAnnotationAutowiredBean", KustomAnnotationAutowiredBean.class);
assertThat(testBean.getDependency(), notNullValue()); assertThat(testBean.getDependency(), notNullValue());
} }

View File

@ -135,7 +135,6 @@ public class ComponentScanParserTests {
* Intentionally spelling "custom" with a "k" since there are numerous * Intentionally spelling "custom" with a "k" since there are numerous
* classes in this package named *Custom*. * classes in this package named *Custom*.
*/ */
@Component("kustomBean")
public static class KustomAnnotationAutowiredBean { public static class KustomAnnotationAutowiredBean {
@Autowired @Autowired