From 14064cbe6faac61ec2a79f6b9c888aeb70969a37 Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Fri, 29 May 2020 14:47:58 -0400 Subject: [PATCH] Use Long.compare in ChapterStartTimeComparator --- .../core/util/comparator/ChapterStartTimeComparator.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/comparator/ChapterStartTimeComparator.java b/core/src/main/java/de/danoeh/antennapod/core/util/comparator/ChapterStartTimeComparator.java index 8bd23c2ed..920a1ef8a 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/comparator/ChapterStartTimeComparator.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/comparator/ChapterStartTimeComparator.java @@ -8,13 +8,7 @@ public class ChapterStartTimeComparator implements Comparator { @Override public int compare(Chapter lhs, Chapter rhs) { - if (lhs.getStart() == rhs.getStart()) { - return 0; - } else if (lhs.getStart() < rhs.getStart()) { - return -1; - } else { - return 1; - } + return Long.compare(lhs.getStart(), rhs.getStart()); } }