Skip to content

Commit 1fe225b

Browse files
author
Vladimir Kotal
committed
use Comparable correctly
1 parent 310e384 commit 1fe225b

File tree

1 file changed

+3
-5
lines changed
  • opengrok-indexer/src/main/java/org/opengrok/indexer/history

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* @author Stanislav Kozina
3333
*/
34-
public abstract class TagEntry implements Comparable {
34+
public abstract class TagEntry implements Comparable<TagEntry> {
3535

3636
protected int revision;
3737
/**
@@ -92,13 +92,11 @@ public Date getDate() {
9292
* @return 1 for greater, 0 for equal and -1 for smaller objects.
9393
*/
9494
@Override
95-
public int compareTo(Object aThat) {
96-
if (this == aThat) {
95+
public int compareTo(TagEntry that) {
96+
if (this == that) {
9797
return 0;
9898
}
9999

100-
final TagEntry that = (TagEntry) aThat;
101-
102100
if (this.revision != NOREV) {
103101
return ((Integer) this.revision).compareTo(that.revision);
104102
}

0 commit comments

Comments
 (0)