Skip to content

Commit 5ccae3f

Browse files
author
Vladimir Kotal
committed
use hash() properly
1 parent ec2fbb1 commit 5ccae3f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/HistoryEntry.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,6 @@ public void stripTags() {
218218
tags = null;
219219
}
220220

221-
private int getHashCode(Object o) {
222-
if (o == null) {
223-
return 0;
224-
}
225-
226-
return o.hashCode();
227-
}
228-
229221
@Override
230222
public boolean equals(Object o) {
231223
if (this == o) {
@@ -246,7 +238,6 @@ public boolean equals(Object o) {
246238

247239
@Override
248240
public int hashCode() {
249-
return Objects.hash(getHashCode(getAuthor()), getHashCode(getRevision()), getHashCode(getDate()),
250-
getHashCode(getMessage()), getHashCode(getFiles()), getHashCode(getTags()));
241+
return Objects.hash(getAuthor(), getRevision(), getDate(), getMessage(), getFiles(), getTags());
251242
}
252243
}

0 commit comments

Comments
 (0)