@@ -54,6 +54,7 @@ public class QualifierAnnotationAutowireContextTests {
5454
5555 private static final String SAM = "sam" ;
5656
57+
5758 @ Test
5859 public void autowiredFieldWithSingleNonQualifiedCandidate () {
5960 GenericApplicationContext context = new GenericApplicationContext ();
@@ -312,24 +313,6 @@ public void autowiredFieldResolvesMetaQualifiedCandidate() {
312313 assertEquals (JUERGEN , bean .getPerson ().getName ());
313314 }
314315
315- /**
316- * @see SpringBean
317- */
318- @ Test
319- @ Ignore ("Disabled until SPR-14058 is resolved" )
320- public void autowiredFieldResolutionIgnoresEmptyQualifierFromComposedQualifierAnnotation () {
321- GenericApplicationContext context = new GenericApplicationContext ();
322- ConstructorArgumentValues cavs1 = new ConstructorArgumentValues ();
323- cavs1 .addGenericArgumentValue (SAM );
324- RootBeanDefinition person1 = new RootBeanDefinition (Person .class , cavs1 , null );
325- context .registerBeanDefinition (SAM , person1 );
326- context .registerBeanDefinition ("autowired" , new RootBeanDefinition (ComposedAnnotationQualifiedFieldTestBean .class ));
327- AnnotationConfigUtils .registerAnnotationConfigProcessors (context );
328- context .refresh ();
329- ComposedAnnotationQualifiedFieldTestBean bean = context .getBean (ComposedAnnotationQualifiedFieldTestBean .class );
330- assertEquals (SAM , bean .getPerson ().getName ());
331- }
332-
333316 @ Test
334317 public void autowiredMethodParameterResolvesQualifiedCandidate () {
335318 GenericApplicationContext context = new GenericApplicationContext ();
@@ -657,37 +640,6 @@ public Person getPerson() {
657640 }
658641
659642
660- /**
661- * {@code @SpringBean} is a composed annotation that combines the semantics of
662- * {@code Autowired @Autowired} and {@code Qualifier @Qualifier}
663- */
664- @ Autowired
665- @ Qualifier
666- @ Retention (RetentionPolicy .RUNTIME )
667- public @interface SpringBean {
668-
669- @ AliasFor (annotation = Qualifier .class )
670- String value () default "" ;
671-
672- @ AliasFor (annotation = Qualifier .class , attribute = "value" )
673- String qualifier () default "" ;
674-
675- @ AliasFor (annotation = Autowired .class )
676- boolean required () default true ;
677-
678- }
679-
680- private static class ComposedAnnotationQualifiedFieldTestBean {
681-
682- @ SpringBean
683- private Person person ;
684-
685- public Person getPerson () {
686- return this .person ;
687- }
688- }
689-
690-
691643 private static class QualifiedMethodParameterTestBean {
692644
693645 private Person person ;
0 commit comments