Skip to content

AnnotatedElementUtils does not find merged repeatable annotations on other repeatable annotations #20279

Closed
@spring-projects-issues

Description

@spring-projects-issues

Liam Bryan opened SPR-15723 and commented

Meta annotations are not detected when present on Repeatable annotations.

Provided zip contains a quick example highlighting this, but for a contained example here (@Retention and @Target annotations omitted):

@Repeatable(A.List.class)
@interface A {

    int value() default 1;
    
    @interface List {
        A[] value();
    }

}
@Repeatable(B.List.class)
@A
@interface B {

    @AliasFor(annotation = A.class, attribute = "value")
    int value();
    
    @interface List {
        B[] value();
    }

}

None of the provided methods in AnnotationUtils or AnnotatedElementUtils can locate the meta-@A annotations for an element with repeated @B annotations.


Affects: 4.3.8

Attachments:

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