mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix broken compareTo() implementation
otherwise calling sort will throw exceptions when running on jdk7
This commit is contained in:
+7
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user