Repository navigation
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)type: 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)type: enhancementA general enhancement
Activity
spring-projects-issues commentedon Mar 25, 2014
Sam Brannen commented
This is related to #15466 and #16136.
spring-projects-issues commentedon May 13, 2015
Sam Brannen commented
Much of the functionality originally intended to be implemented in conjunction with this JIRA issue has been superseded by the recent introduction of the
AnnotatedElementUtils.findAnnotationAttributes()methods.See comments in #17335 for details.
spring-projects-issues commentedon May 13, 2015
Sam Brannen commented
Resolved as described in GitHub commit ebed52c: