mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Avoid recursion in ClassFileAnnotationMetadata.resolveTypeName()
See gh-36577
This commit is contained in:
+4
-3
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user