Skip to content

Commit

Permalink
Restore original toString representation (revert accidental backport)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Mar 17, 2024
1 parent f7f1028 commit d21100f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,16 +511,12 @@ public int hashCode() {
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.
Expand Down Expand Up @@ -802,7 +798,7 @@ public int hashCode() {

@Override
public String toString() {
return "AnnotatedElementAdapter annotations=" + Arrays.toString(this.annotations);
return Arrays.toString(this.annotations);
}
}

Expand Down

0 comments on commit d21100f

Please sign in to comment.