Add a reference equality check to Label#equals.
@@ -628,6 +628,9 @@ public final class Label
/** Two labels are equal iff both their name and their package name are equal. */
@Override
public boolean equals(Object other) {
+ if (this == other) {
+ return true;
+ }
if (!(other instanceof Label)) {
return false;
}
