diff --git a/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/RankingProvider.java b/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/RankingProvider.java index 91232ce0..e8769fdc 100644 --- a/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/RankingProvider.java +++ b/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/RankingProvider.java @@ -220,9 +220,10 @@ public List getCompetitorsGlobalScoreRanking(Collection unties = duelProvider.getUnties(competitors).stream().filter(duel -> from == null || duel.getCreatedAt().isAfter(from)).toList(); - final Set participantsInFights = fights.stream().flatMap(fight -> fight.getTeam1().getMembers().stream()).collect(Collectors.toSet()); + final Set participantsInFights = fights.stream().flatMap(fight -> + fight.getTeam1().getMembers().stream()).collect(Collectors.toSet()); participantsInFights.addAll(fights.stream().flatMap(fight -> fight.getTeam2().getMembers().stream()).collect(Collectors.toSet())); - competitors.retainAll(participantsInFights); + competitors.retainAll(new HashSet<>(participantsInFights)); for (final Participant competitor : competitors) { scores.add(new ScoreOfCompetitor(competitor, fights, unties, false)); }