df0396f4ddac410ac5b01699c134019055200fa2
java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractLeaderboardWithCache.java
| ... | ... | @@ -542,10 +542,6 @@ public abstract class AbstractLeaderboardWithCache implements Leaderboard { |
| 542 | 542 | }); |
| 543 | 543 | futuresForCompetitorAndColumnName.put(new Pair<>(competitor, raceColumn.getName()), new Pair<>(row, future)); |
| 544 | 544 | } |
| 545 | - if (addOverallDetails) { |
|
| 546 | - //this reuses several prior calculated fields, so must be evaluated after them |
|
| 547 | - row.totalScoredRaces = this.getTotalRaces(competitor, row, timePoint); |
|
| 548 | - } |
|
| 549 | 545 | result.rows.put(competitorDTO, row); |
| 550 | 546 | String displayName = this.getDisplayName(competitor); |
| 551 | 547 | if (displayName != null) { |
| ... | ... | @@ -565,6 +561,10 @@ public abstract class AbstractLeaderboardWithCache implements Leaderboard { |
| 565 | 561 | final String columnName = competitorAndRaceColumnNameAndRowAndFuture.getKey().getB(); |
| 566 | 562 | final Future<LeaderboardEntryDTO> future = competitorAndRaceColumnNameAndRowAndFuture.getValue().getB(); |
| 567 | 563 | rowForCompetitor.fieldsByRaceColumnName.put(columnName, future.get()); |
| 564 | + if (addOverallDetails) { |
|
| 565 | + //this reuses several prior calculated fields, so must be evaluated after them |
|
| 566 | + rowForCompetitor.totalScoredRaces = this.getTotalRaces(competitorAndRaceColumnNameAndRowAndFuture.getKey().getA(), rowForCompetitor, timePoint); |
|
| 567 | + } |
|
| 568 | 568 | } catch (InterruptedException e) { |
| 569 | 569 | throw new RuntimeException(e); |
| 570 | 570 | } catch (ExecutionException e) { |