--- old/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java 2016-07-15 09:57:18.497543172 -0700 +++ new/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java 2016-07-15 09:57:18.353471167 -0700 @@ -202,6 +202,14 @@ } + String inlineAnnotationsAsString() { + StringJoiner sj = new StringJoiner(" " ); + for (Annotation annotation : getDeclaredAnnotations() ) { + sj.add(annotation.toString()); + } + return sj.toString(); + } + // Implementation details final LocationInfo getLocation() { return location; @@ -244,6 +252,13 @@ } return ((GenericArrayType)t).getGenericComponentType(); } + + @Override + public String toString() { + // do the annotations go the right way round? + AnnotatedType at = getAnnotatedGenericComponentType(); + return inlineAnnotationsAsString + at.toString() + "[]" + } } private static final class AnnotatedTypeVariableImpl extends AnnotatedTypeBaseImpl implements AnnotatedTypeVariable { @@ -266,6 +281,13 @@ private TypeVariable getTypeVariable() { return (TypeVariable)getType(); } + + @Override + public String toString() { + // do the annotations go the right way round? + AnnotatedType at = getAnnotatedGenericComponentType(); + return inlineAnnotationsAsString + getType().getTypeName(); + } } private static final class AnnotatedParameterizedTypeImpl extends AnnotatedTypeBaseImpl