Restore original toString representation (revert accidental backport)
See gh-32405
This commit is contained in:
parent
eb8b7c4331
commit
b1c3b6e34b
|
@ -545,16 +545,12 @@ public class TypeDescriptor implements Serializable {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (Annotation ann : getAnnotations()) {
|
for (Annotation ann : getAnnotations()) {
|
||||||
builder.append('@').append(getName(ann.annotationType())).append(' ');
|
builder.append('@').append(ann.annotationType().getName()).append(' ');
|
||||||
}
|
}
|
||||||
builder.append(getResolvableType());
|
builder.append(getResolvableType());
|
||||||
return builder.toString();
|
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.
|
* Create a new type descriptor for an object.
|
||||||
|
@ -810,7 +806,7 @@ public class TypeDescriptor implements Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "AnnotatedElementAdapter annotations=" + Arrays.toString(this.annotations);
|
return Arrays.toString(this.annotations);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue