Skip to content

AnnotationUtils does not support arbitrary levels of meta-annotations on methods [SPR-12941] #17534

Closed
@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-12941 and commented

Status Quo

In contrast to the search algorithm used by the findAnnotation(Class, Class) method in AnnotationUtils, the findAnnotation(Method, Class) method currently only finds direct annotations or direct meta-annotations (i.e., one level of meta-annotations).

This lacking support for multiple levels of meta-annotations has been the cause of failing (though currently @Ignored) tests in TransactionalEventListenerTests since @EventListener is not discovered as a meta-meta-annotation by the EventListenerMethodProcessor.

Deliverables

  1. Rework findAnnotation(Method, Class) so that it supports arbitrary levels of meta-annotations on methods.

Issue Links:

Referenced from: commits b9b0b78

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions