From 57eee82a63718d423bcbda55029c68786aeb8b57 Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Mon, 21 Mar 2016 09:59:55 +0100 Subject: [PATCH] use existing inference of passing instructions that it used elsewhere Change-Id: I061d67f90fb6ec770b19b765dc787340a3f882da --- .../markpassingcalculation/impl/CandidateFinderImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/markpassingcalculation/impl/CandidateFinderImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/markpassingcalculation/impl/CandidateFinderImpl.java index 7cf9ef932d9..4a785b65a0c 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/markpassingcalculation/impl/CandidateFinderImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/markpassingcalculation/impl/CandidateFinderImpl.java @@ -764,7 +764,7 @@ public class CandidateFinderImpl implements CandidateFinder { result = 1.0; } else { // if the start waypoint's passing instructions are unknown, assume it's a line - final boolean startIsLine = start.getPassingInstructions() == PassingInstruction.Line || start.getPassingInstructions() == PassingInstruction.None; + final boolean startIsLine = getPassingInstructions(start) == PassingInstruction.Line; final List distancesToStartLineOfOtherCompetitors = new ArrayList<>(); for (final Competitor otherCompetitor : race.getRace().getCompetitors()) { if (otherCompetitor != c) { @@ -915,7 +915,7 @@ public class CandidateFinderImpl implements CandidateFinder { } pos.add(po); } - if (pos.size() != 2){ + if (pos.size() != 2) { return true; } Bearing diff1 = pos.get(0).getBearingGreatCircle(p) @@ -925,7 +925,6 @@ public class CandidateFinderImpl implements CandidateFinder { if (Math.abs(diff1.getDegrees()) > 90 || Math.abs(diff2.getDegrees()) > 90) { result = false; } - } else { Mark m = null; if (instruction == PassingInstruction.Single_Unknown || instruction == PassingInstruction.Port || instruction == PassingInstruction.Starboard