fix broken compareTo() implementation

otherwise calling sort will throw exceptions when running on jdk7
This commit is contained in:
Bas Leijdekkers
2011-03-21 11:19:06 +01:00
parent ac23b3a67d
commit 8729d579ca
@@ -38,7 +38,13 @@ class RevisionWrapper implements Comparable<RevisionWrapper> {
}
public int compareTo(final RevisionWrapper o) {
return (int)(myTime - o.myTime);
final long diff = myTime - o.myTime;
if (diff < 0) {
return -1;
} else if (diff > 0) {
return 1;
}
return 0;
}
public String getFile() {