Skip to content
Snippets Groups Projects
Unverified Commit 95382efa authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #2078 from APriestman/trackPointCompareNPE

Check for case where both timestamps are null.
parents 7cf8a15a 392242da
Branches
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