--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Attribute.java 2019-06-05 17:17:42.661033273 -0700 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Attribute.java 2019-06-05 17:17:42.301033273 -0700 @@ -63,6 +63,23 @@ throw new UnsupportedOperationException(); } + @Override + @DefinedBy(Api.LANGUAGE_MODEL) + public boolean equals(Object o) { + if (o instanceof AnnotationValue) { + AnnotationValue that = (AnnotationValue) o; + return getValue().equals(that.getValue()); + } else { + return false; + } + } + + @Override + @DefinedBy(Api.LANGUAGE_MODEL) + public int hashCode() { + return getValue().hashCode(); + } + public boolean isSynthesized() { return false; } @@ -262,6 +279,26 @@ return buf.toString(); } + @Override + @DefinedBy(Api.LANGUAGE_MODEL) + public boolean equals(Object o) { + if (o instanceof AnnotationMirror) { + AnnotationMirror that = (AnnotationMirror) o; + return + getAnnotationType().equals(that.getAnnotationType()) && + getElementValues().equals(that.getElementValues()); + } else { + return false; + } + } + + @Override + @DefinedBy(Api.LANGUAGE_MODEL) + public int hashCode() { + return getAnnotationType().hashCode() ^ + getElementValues().hashCode(); + } + public Attribute member(Name member) { Pair res = getElemPair(member); return res == null ? null : res.snd;