Skip to content
Snippets Groups Projects
Commit 392242da authored by apriestman's avatar apriestman
Browse files

Check for case where both timestamps are null.

parent 73f9fe11
Branches
Tags
No related merge requests found
...@@ -219,8 +219,12 @@ public Long getTimeStamp() { ...@@ -219,8 +219,12 @@ public Long getTimeStamp() {
public int compareTo(TrackPoint otherTP) { public int compareTo(TrackPoint otherTP) {
Long otherTimeStamp = otherTP.getTimeStamp(); Long otherTimeStamp = otherTP.getTimeStamp();
if (timestamp == null && otherTimeStamp != null) { if (timestamp == null) {
return -1; if (otherTimeStamp != null) {
return -1;
} else {
return 0;
}
} else if (timestamp != null && otherTimeStamp == null) { } else if (timestamp != null && otherTimeStamp == null) {
return 1; return 1;
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment