Closed
Description
John Bass opened SPR-12633 and commented
After upgraded from Spring 4.0.2.RELEASE to 4.1.4.RELEASE, I noticed that the AnnotationTypeFilter class is no longer able to find meta annotations. Here's a snippet:
public @interface MetaAnnotation {
}
@MetaAnnotation
public @interface CustomAnnotation {
}
@CustomAnnotation
public class TestBean {
}
@Test
public void metaAnnotationNotWorking() throws Exception {
AnnotationTypeFilter typeFilter = new AnnotationTypeFilter( MetaAnnotation.class, true );
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider( false );
provider.addIncludeFilter( typeFilter );
Set<BeanDefinition> candidates = provider.findCandidateComponents( TestBean.class.getPackage().getName() );
assert !candidates.isEmpty();
}
Affects: 4.1.4
Issue Links:
- Support meta-annotation attribute overrides in ASM-based annotation processing [SPR-11574] #16198 Support meta-annotation attribute overrides in ASM-based annotation processing