-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Sam Brannen opened SPR-11598 and commented
Background
This issue picks up where #16100 left off.
Status Quo
The implementations of AnnotatedElementUtils and (potentially) Spring's ASM-based annotation processing currently favor inherited annotations and inherited composed annotations over composed annotations that are declared closer to the starting class passed to getAnnotationAttributes(), getAllAnnotationAttributes(), isAnnotated(), etc.
See the examples and related discussion in #16100 for details.
Deliverables
- Determine which use cases require special treatment with regard to annotation inheritance.
- Known cases:
@Profileand@Conditional
- Known cases:
- Reinstate the changes originally introduced in
AnnotatedElementUtilsfor Favor more locally declared composed annotations over inherited annotations in AnnotationUtils [SPR-11475] #16100 (i.e., set thesearchClassHierarchytotruefor all invocations of the internalprocess()method).- Search for Favor more locally declared composed annotations over inherited annotations [SPR-11598] #16221 in source code for TODOs.
- Introduce special handling for the known special cases determined in deliverable Spring core JMS pom.xml #1, in order to ensure proper backwards compatibility.
Affects: 4.0 GA
Issue Links:
- Favor more locally declared composed annotations over inherited annotations in AnnotationUtils [SPR-11475] #16100 Favor more locally declared composed annotations over inherited annotations in AnnotationUtils ("depends on")
- @TestExecutionListeners is not fully supported as a meta-annotation [SPR-12661] #17261
@TestExecutionListenersis not fully supported as a meta-annotation ("is duplicated by") - @Conditional on superclass is ignored [SPR-10840] #15466
@Conditionalon superclass is ignored - Introduce a comprehensive programming model for meta-annotation support [SPR-11511] #16136 Introduce a comprehensive programming model for meta-annotation support
- ActiveProfiles not included when using a custom annotation. [SPR-13748] #18321 ActiveProfiles not included when using a custom annotation.
- Annotations on superclasses are detected by StandardAnnotationMetadata [SPR-11595] #16219 Annotations on superclasses are detected by StandardAnnotationMetadata
- AnnotatedElementUtils fails to find annotations on abstract, bridge, or interface methods [SPR-12738] #17335 AnnotatedElementUtils fails to find annotations on abstract, bridge, or interface methods
- Favor more locally declared composed annotations over inherited annotations in the TestContext framework [SPR-12749] #17346 Favor more locally declared composed annotations over inherited annotations in the TestContext framework
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement