Skip to content
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

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

Closed
spring-issuemaster opened this issue Mar 7, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

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:

  • #17340 Support @NumberFormat as a meta-annotation ("depends on")
  • #16074 AnnotationUtils.findAnnotation() should support arbitrary levels of meta-annotations
  • #16095 MetaAnnotationUtils should support arbitrary levels of meta-annotations

Referenced from: commits 04d6afe

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented May 8, 2015

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
You can’t perform that action at this time.