Skip to content

Commit

Permalink
use hash() properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Kotal committed Apr 16, 2021
1 parent ec2fbb1 commit 5ccae3f
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,6 @@ public void stripTags() {
tags = null;
}

private int getHashCode(Object o) {
if (o == null) {
return 0;
}

return o.hashCode();
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -246,7 +238,6 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(getHashCode(getAuthor()), getHashCode(getRevision()), getHashCode(getDate()),
getHashCode(getMessage()), getHashCode(getFiles()), getHashCode(getTags()));
return Objects.hash(getAuthor(), getRevision(), getDate(), getMessage(), getFiles(), getTags());
}
}

0 comments on commit 5ccae3f

Please sign in to comment.