mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Try to fix "Comparison method violates its general contract" error.
This commit is contained in:
parent
1bee035aaa
commit
663c6fe1e9
1 changed files with 8 additions and 0 deletions
|
@ -251,20 +251,28 @@ class TableListSorter implements Comparator<Table> {
|
|||
} else {
|
||||
return two.getEndTime().compareTo(one.getEndTime());
|
||||
}
|
||||
} else if (one.getEndTime() != null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (two.getStartTime() != null) {
|
||||
if (one.getStartTime() == null) {
|
||||
return 1;
|
||||
} else {
|
||||
return two.getStartTime().compareTo(one.getStartTime());
|
||||
}
|
||||
} else if (one.getStartTime() != null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (two.getCreateTime() != null) {
|
||||
if (one.getCreateTime() == null) {
|
||||
return 1;
|
||||
} else {
|
||||
return two.getCreateTime().compareTo(one.getCreateTime());
|
||||
}
|
||||
} else if (one.getCreateTime() != null) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue