Honor classValuesAsString in getMergedRepeatableAnnotationAttributes()
Closes gh-31768
This commit is contained in:
@@ -325,11 +325,13 @@ class AnnotationMetadataTests {
|
||||
|
||||
private static void assertRepeatableAnnotations(AnnotationMetadata metadata) {
|
||||
Set<AnnotationAttributes> attributesSet =
|
||||
metadata.getMergedRepeatableAnnotationAttributes(TestComponentScan.class, TestComponentScans.class, false);
|
||||
metadata.getMergedRepeatableAnnotationAttributes(TestComponentScan.class, TestComponentScans.class, true);
|
||||
assertThat(attributesSet.stream().map(attributes -> attributes.getStringArray("value")).flatMap(Arrays::stream))
|
||||
.containsExactly("A", "B", "C", "D");
|
||||
assertThat(attributesSet.stream().map(attributes -> attributes.getStringArray("basePackages")).flatMap(Arrays::stream))
|
||||
.containsExactly("A", "B", "C", "D");
|
||||
assertThat(attributesSet.stream().map(attributes -> attributes.getStringArray("basePackageClasses")).flatMap(Arrays::stream))
|
||||
.containsExactly("java.lang.String", "java.lang.Integer");
|
||||
}
|
||||
|
||||
private static void assertRepeatableAnnotationsSortedByReversedMetaDistance(AnnotationMetadata metadata) {
|
||||
@@ -693,16 +695,16 @@ class AnnotationMetadataTests {
|
||||
public @interface ScanPackagesCandD {
|
||||
}
|
||||
|
||||
@TestComponentScan("A")
|
||||
@TestComponentScan(basePackages = "A", basePackageClasses = String.class)
|
||||
@ScanPackageC
|
||||
@ScanPackageD
|
||||
@TestComponentScan("B")
|
||||
@TestComponentScan(basePackages = "B", basePackageClasses = Integer.class)
|
||||
static class MultipleComposedRepeatableAnnotationsClass {
|
||||
}
|
||||
|
||||
@TestComponentScan("A")
|
||||
@TestComponentScan(basePackages = "A", basePackageClasses = String.class)
|
||||
@ScanPackagesCandD
|
||||
@TestComponentScans(@TestComponentScan("B"))
|
||||
@TestComponentScans(@TestComponentScan(basePackages = "B", basePackageClasses = Integer.class))
|
||||
static class MultipleRepeatableAnnotationsInContainersClass {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user