Restore original toString representation (revert accidental backport)

See gh-32405
This commit is contained in:
Juergen Hoeller 2024-03-17 20:42:29 +01:00
parent eb8b7c4331
commit b1c3b6e34b
1 changed files with 2 additions and 6 deletions

View File

@ -545,16 +545,12 @@ public class TypeDescriptor implements Serializable {
public String toString() {
StringBuilder builder = new StringBuilder();
for (Annotation ann : getAnnotations()) {
builder.append('@').append(getName(ann.annotationType())).append(' ');
builder.append('@').append(ann.annotationType().getName()).append(' ');
}
builder.append(getResolvableType());
return builder.toString();
}
private static String getName(Class<?> clazz) {
String canonicalName = clazz.getCanonicalName();
return (canonicalName != null ? canonicalName : clazz.getName());
}
/**
* Create a new type descriptor for an object.
@ -810,7 +806,7 @@ public class TypeDescriptor implements Serializable {
@Override
public String toString() {
return "AnnotatedElementAdapter annotations=" + Arrays.toString(this.annotations);
return Arrays.toString(this.annotations);
}
}