@@ -54,6 +54,7 @@ public class QualifierAnnotationAutowireContextTests {
54
54
55
55
private static final String SAM = "sam" ;
56
56
57
+
57
58
@ Test
58
59
public void autowiredFieldWithSingleNonQualifiedCandidate () {
59
60
GenericApplicationContext context = new GenericApplicationContext ();
@@ -312,24 +313,6 @@ public void autowiredFieldResolvesMetaQualifiedCandidate() {
312
313
assertEquals (JUERGEN , bean .getPerson ().getName ());
313
314
}
314
315
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
-
333
316
@ Test
334
317
public void autowiredMethodParameterResolvesQualifiedCandidate () {
335
318
GenericApplicationContext context = new GenericApplicationContext ();
@@ -657,37 +640,6 @@ public Person getPerson() {
657
640
}
658
641
659
642
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
-
691
643
private static class QualifiedMethodParameterTestBean {
692
644
693
645
private Person person ;
0 commit comments