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
No related branches found
No related tags found
No related merge requests found
......@@ -219,8 +219,12 @@ public Long getTimeStamp() {
public int compareTo(TrackPoint otherTP) {
Long otherTimeStamp = otherTP.getTimeStamp();
if (timestamp == null && otherTimeStamp != null) {
return -1;
if (timestamp == null) {
if (otherTimeStamp != null) {
return -1;
} else {
return 0;
}
} else if (timestamp != null && otherTimeStamp == null) {
return 1;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment