mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
treeset uses compareTo instead of equals
This commit is contained in:
@@ -55,16 +55,18 @@ public class FeedEntryStatusDAO extends GenericDAO<FeedEntryStatus> {
|
|||||||
private static final Comparator<FeedEntryStatus> STATUS_COMPARATOR_DESC = new Comparator<FeedEntryStatus>() {
|
private static final Comparator<FeedEntryStatus> STATUS_COMPARATOR_DESC = new Comparator<FeedEntryStatus>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(FeedEntryStatus o1, FeedEntryStatus o2) {
|
public int compare(FeedEntryStatus o1, FeedEntryStatus o2) {
|
||||||
return ObjectUtils.compare(o2.getEntryUpdated(),
|
int compare = ObjectUtils.compare(o2.getEntryUpdated(),
|
||||||
o1.getEntryUpdated());
|
o1.getEntryUpdated());
|
||||||
|
return compare == 0 ? 1 : compare;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Comparator<FeedEntryStatus> STATUS_COMPARATOR_ASC = new Comparator<FeedEntryStatus>() {
|
private static final Comparator<FeedEntryStatus> STATUS_COMPARATOR_ASC = new Comparator<FeedEntryStatus>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(FeedEntryStatus o1, FeedEntryStatus o2) {
|
public int compare(FeedEntryStatus o1, FeedEntryStatus o2) {
|
||||||
return ObjectUtils.compare(o1.getEntryUpdated(),
|
int compare = ObjectUtils.compare(o1.getEntryUpdated(),
|
||||||
o2.getEntryUpdated());
|
o2.getEntryUpdated());
|
||||||
|
return compare == 0 ? 1 : compare;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user