Closed
Description
Most likely related to the fix for #22654 we have another subtle regression when dealing with value attributes on meta meta-annotations.
The following test passes with 5.1 but fails with 5.2
@Test
public void testName() {
ValueAttribute annotation = AnnotatedElementUtils
.getMergedAnnotation(AnotherConfig.class, ValueAttribute.class);
assertThat(annotation.value()).containsExactly("FromAliasedValueAttributeMeta");
}
@Retention(RetentionPolicy.RUNTIME)
static @interface ValueAttribute {
String[] value();
}
@Retention(RetentionPolicy.RUNTIME)
@ValueAttribute("FromAliasedValueAttributeMeta")
static @interface AliasedValueAttributeMeta {
@AliasFor("alias")
String[] value() default {};
@AliasFor("value")
String[] alias() default {};
}
@Retention(RetentionPolicy.RUNTIME)
@AliasedValueAttributeMeta("FromAliasedValueAttributeMetaMeta")
static @interface AliasedValueAttributeMetaMeta {
}
@AliasedValueAttributeMetaMeta
static class AnotherConfig {
}