added some null-safety to CandidateFinderImpl; see also bug 2857

This commit is contained in:
Axel Uhl committed 2015-05-18 12:48:05 +02:00
1 parent f9b0b8a41c
commit 0923fb203d
1 file changed
+1 -5
@@ -479,7 +479,7 @@ public class CandidateFinderImpl implements CandidateFinder {
}
}
List<Distance> wayPointXTEs = xtes.get(w);
int size = wayPointXTEs.size();
int size = wayPointXTEs == null ? 0 : wayPointXTEs.size();
if (size > 0) {
Double xte = wayPointXTEs.get(0).getMeters();
if (xte == 0) {
@@ -710,11 +710,7 @@ public class CandidateFinderImpl implements CandidateFinder {
boolean singleMark = false;
switch (instruction) {
case Port:
singleMark = true;
break;
case Starboard:
singleMark = true;
break;
case FixedBearing:
singleMark = true;
break;