working towards bug 961: use isValidInTotalScore now in getTotalPoints and henceforth in getCompetitorsFromBestToWorst

This commit is contained in:
Axel Uhl committed 2012-10-01 23:00:40 +02:00
1 parent c843089a57
commit e71e58649c
1 file changed
+5 -3
@@ -242,9 +242,11 @@ public abstract class AbstractSimpleLeaderboardImpl implements Leaderboard, Race
public Double getTotalPoints(Competitor competitor, TimePoint timePoint) throws NoWindException {
double result = getCarriedPoints(competitor);
for (RaceColumn r : getRaceColumns()) {
final Double totalPoints = getTotalPoints(competitor, r, timePoint);
if (totalPoints != null) {
result += totalPoints;
if (getScoringScheme().isValidInTotalScore(this, r, timePoint)) {
final Double totalPoints = getTotalPoints(competitor, r, timePoint);
if (totalPoints != null) {
result += totalPoints;
}
}
}
return result;