diff --git a/spring-core/src/main/java24/org/springframework/core/type/classreading/ClassFileAnnotationMetadata.java b/spring-core/src/main/java24/org/springframework/core/type/classreading/ClassFileAnnotationMetadata.java index e205385ff18..2ddf9844fcd 100644 --- a/spring-core/src/main/java24/org/springframework/core/type/classreading/ClassFileAnnotationMetadata.java +++ b/spring-core/src/main/java24/org/springframework/core/type/classreading/ClassFileAnnotationMetadata.java @@ -226,10 +226,11 @@ final class ClassFileAnnotationMetadata implements AnnotationMetadata { if (type.isPrimitive()) { return type.displayName(); } - if (type.isArray()) { - return resolveTypeName(type.componentType()) + "[]"; + ClassDesc effectiveType = type; + while (effectiveType.isArray()) { + effectiveType = effectiveType.componentType(); } - String packageName = type.packageName(); + String packageName = effectiveType.packageName(); return (packageName.isEmpty() ? type.displayName() : packageName + "." + type.displayName()); }