Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on May 8, 2015

    @spring-projects-issues
    CollaboratorAuthor

    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().

  2. added
    type: enhancement
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions