java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/ScoreCorrectionImpl.java
... ...
@@ -334,13 +334,12 @@ public class ScoreCorrectionImpl implements SettableScoreCorrection {
334 334
NavigableSet<MarkPassing> markPassings = trackedRace.getMarkPassings(competitor);
335 335
final MarkPassing lastMarkPassing;
336 336
// count race as finished for the competitor if the finish mark passing exists or the time is after the end of race
337
- if (markPassings != null && !markPassings.isEmpty() &&
338
- (lastMarkPassing = markPassings.last()).getWaypoint() == trackedRace.getRace().getCourse().getLastWaypoint()) {
339
- result = timePoint.before(lastMarkPassing.getTimePoint());
340
- } else {
341
- // if available, use the end of the race as indicator for how long competitor may have been in the race
342
- result = timePoint.before(endOfRace);
343
- }
337
+ final boolean raceFinishedForCompetitor =
338
+ (markPassings != null && !markPassings.isEmpty() &&
339
+ (lastMarkPassing = markPassings.last()).getWaypoint() == trackedRace.getRace().getCourse().getLastWaypoint() &&
340
+ !timePoint.before(lastMarkPassing.getTimePoint()))
341
+ || !timePoint.before(endOfRace);
342
+ result = !raceFinishedForCompetitor;
344 343
} else {
345 344
boolean preResult = false;
346 345
for (RaceColumn rc : getLeaderboard().getRaceColumns()) {