Support meta-annotation attribute overrides in ASM-based annotation processing [SPR-11574] #16198
Closed
1 task done
Labels
Milestone
Sam Brannen opened SPR-11574 and commented
Status Quo
Recent releases of the Spring Framework have introduced support for meta-annotation attribute overrides in custom composed annotations. This support works as expected with reflection-based annotation processing; however, Spring's ASM-based support for annotation processing completely ignores meta-annotation attribute overrides.
Analysis
By comparing the implementations of
getAnnotationAttributes(String, boolean)
inStandardAnnotationMetadata
(reflection) andAnnotationMetadataReadingVisitor
(ASM), we see thatStandardAnnotationMetadata
delegates toAnnotatedElementUtils
which properly supports meta-annotation attribute overrides. Whereas,AnnotationMetadataReadingVisitor
performs a simple look-up in a local (linked) hash map with complete disregard for attribute overrides.Deliverables
AnnotationMetadataReadingVisitor
so that Spring's ASM-based annotation processing supports meta-annotation attribute overrides on par with the support already provided for reflection-based processing inAnnotatedElementUtils
.ConfigurationClassPostProcessorTests
.Affects: 4.0 GA
Issue Links:
The text was updated successfully, but these errors were encountered: