Commit f8ee7cf0 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Simplify compareTo methods.

parent 38bd70ae
......@@ -194,8 +194,7 @@ public class ClientsHistory implements Comparable<ClientsHistory> {
@Override
public int compareTo(ClientsHistory other) {
return this.startMillis < other.startMillis ? -1
: this.startMillis > other.startMillis ? 1 : 0;
return Long.compare(this.startMillis, other.startMillis);
}
@Override
......
......@@ -128,8 +128,7 @@ public class UptimeHistory implements Comparable<UptimeHistory> {
} else if (!this.relay && other.relay) {
return 1;
}
return this.startMillis < other.startMillis ? -1
: this.startMillis > other.startMillis ? 1 : 0;
return Long.compare(this.startMillis, other.startMillis);
}
@Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment