--- old/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java 2019-05-28 09:48:27.283582785 -0700 +++ new/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java 2019-05-28 09:48:26.859370785 -0700 @@ -393,29 +393,22 @@ return (TypeVariable)getType(); } - // For toString, the declaration of a type variable should + // The declaration of a type variable should // including information about its bounds, etc. However, the // use of a type variable should not. For that reason, it is - // acceptable for the toString implementation of + // acceptable for the toString and hashCode implementations of // AnnotatedTypeVariableImpl to use the inherited - // implementation from AnnotatedTypeBaseImpl. + // implementations from AnnotatedTypeBaseImpl. @Override public boolean equals(Object o) { if (o instanceof AnnotatedTypeVariable) { AnnotatedTypeVariable that = (AnnotatedTypeVariable) o; - return equalsTypeAndAnnotations(that) && - Arrays.equals(getAnnotatedBounds(), that.getAnnotatedBounds()); + return equalsTypeAndAnnotations(that); } else { return false; } } - - @Override - public int hashCode() { - return baseHashCode() ^ - Objects.hash((Object[])getAnnotatedBounds()); - } } private static final class AnnotatedParameterizedTypeImpl extends AnnotatedTypeBaseImpl