Skip to content

TypeDescriptor should support arbitrary levels of meta-annotations [SPR-12793] #17390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
spring-projects-issues opened this issue Mar 7, 2015 · 1 comment
Closed
1 task done
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 7, 2015

Sam Brannen opened SPR-12793 and commented

Status Quo

The getAnnotation() method in TypeDescriptor currently only supports a single level of meta-annotations.

In other words, meta-annotations on meta-annotations will never be found, and this does not align with Spring's standard support for meta-annotations with arbitrary levels.

For example, @NumberFormat and @DateTimeFormat are supported as meta-annotations but not as meta-meta-annotations.

Deliverables

  1. Alter the search algorithm used in TypeDescriptor.getAnnotation() so that arbitrary levels of meta-annotations are supported.

Affects: 3.2 GA

Issue Links:

Referenced from: commits 04d6afe

@spring-projects-issues
Copy link
Collaborator Author

Sam Brannen commented

Resolved as described in GitHub commit 04d6afe:

Support arbitrary levels of meta-annotations in TypeDescriptor

Prior to this commit, the getAnnotation() method in TypeDescriptor
only supported a single level of meta-annotations. In other words, the
annotation hierarchy would not be exhaustively searched.

This commit provides support for arbitrary levels of meta-annotations
in TypeDescriptor by delegating to AnnotationUtils.findAnnotation()
within TypeDescriptor.getAnnotation().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants