Skip to content

Avoid unnecessary inspection of meta-annotations on Java annotations [SPR-11483] #16108

Closed
@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-11483 and commented

Status Quo

Several annotation-based search algorithms within the Spring Framework inspect meta-annotations on Java annotations as part of their recursive search processes. However, such inspection is unnecessary simply because any annotation on a Java annotation (e.g., @Retention, @Target, @Documented, etc.) will be irrelevant to the current search. In other words, a Spring annotation or a custom user annotation will never be present on a Java annotation. So it makes no sense to look for it there.

Deliverables

For each of the affected search algorithms in the following classes, do not inspect meta-annotations on annotations from the java.lang.annotation package.

  1. AnnotationUtils
  2. AnnotatedElementUtils
  3. MetaAnnotationUtils

Affects: 4.0 GA

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)in: testIssues in the test moduletype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions