Support customer repeatable containers in type map

Update `AnnotationTypeMappings` so that a custom `RepeatableContainers`
instances can be used. Prior to this commit, only standard repeatables
were used when reading the annotations. This works in most situations,
but causes regressions for some `AnnotationUtils` methods.

Fixed gh-23856
This commit is contained in:
Phillip Webb
2019-10-24 11:54:42 -07:00
parent f8b875d2d8
commit 013ec6abdb
3 changed files with 44 additions and 10 deletions

View File

@@ -34,7 +34,6 @@ import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.core.Ordered;
@@ -974,7 +973,6 @@ class AnnotationUtilsTests {
}
@Test // gh-23856
@Disabled("disabled until gh-23856 is resolved")
void findAnnotationFindsRepeatableContainerOnComposedAnnotationMetaAnnotatedWithRepeatableAnnotationsOnMethod() throws NoSuchMethodException {
Method method = getClass().getDeclaredMethod("methodWithComposedAnnotationMetaAnnotatedWithRepeatableAnnotations");
MyRepeatableContainer annotation = AnnotationUtils.findAnnotation(method, MyRepeatableContainer.class);