mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-10 14:20:55 +00:00
added some null-safety to CandidateFinderImpl; see also bug 2857
This commit is contained in:
1 parent
f9b0b8a41c
commit
0923fb203d
1 file changed
+1
-5
+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;
|
||||
|
||||
Reference in new issue
Block a user