Skip to content

Commit b1c3b6e

Browse files
committed
Restore original toString representation (revert accidental backport)
See gh-32405
1 parent eb8b7c4 commit b1c3b6e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

+2-6
Original file line numberDiff line numberDiff line change
@@ -545,16 +545,12 @@ public int hashCode() {
545545
public String toString() {
546546
StringBuilder builder = new StringBuilder();
547547
for (Annotation ann : getAnnotations()) {
548-
builder.append('@').append(getName(ann.annotationType())).append(' ');
548+
builder.append('@').append(ann.annotationType().getName()).append(' ');
549549
}
550550
builder.append(getResolvableType());
551551
return builder.toString();
552552
}
553553

554-
private static String getName(Class<?> clazz) {
555-
String canonicalName = clazz.getCanonicalName();
556-
return (canonicalName != null ? canonicalName : clazz.getName());
557-
}
558554

559555
/**
560556
* Create a new type descriptor for an object.
@@ -810,7 +806,7 @@ public int hashCode() {
810806

811807
@Override
812808
public String toString() {
813-
return "AnnotatedElementAdapter annotations=" + Arrays.toString(this.annotations);
809+
return Arrays.toString(this.annotations);
814810
}
815811
}
816812

0 commit comments

Comments
 (0)