RelatedChangesSorter.PatchSetData: Add missing equals method
This class was implementing hashCode() but had no equals method. Change-Id: Ib54862f2507eb4b2d54846e785ca9bd0cc561c16 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -275,5 +275,15 @@ class RelatedChangesSorter {
|
||||
public int hashCode() {
|
||||
return Objects.hash(patchSet().getId(), commit());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof PatchSetData)) {
|
||||
return false;
|
||||
}
|
||||
PatchSetData o = (PatchSetData) obj;
|
||||
return Objects.equals(patchSet().getId(), o.patchSet().getId())
|
||||
&& Objects.equals(commit(), o.commit());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user