Fix merge-commit, missing the improvement introduced in commit: 63c9caaf96

This commit is contained in:
Lampros Smyrnaios 2022-12-21 13:44:58 +02:00
parent 4850581c53
commit ceb53248ce
1 changed files with 1 additions and 4 deletions

View File

@ -66,11 +66,8 @@ public class AggregationServiceImpl implements AggregationService {
private <T extends AggregationInfo> Map<String, List<T>> createYearMap(List<T> aggregationHistory) {
aggregationHistory = aggregationHistory.stream()
.sorted(Comparator.comparing(AggregationInfo::getDate).reversed())
.collect(Collectors.toList());
return aggregationHistory.stream()
.sorted(Comparator.comparing(AggregationInfo::getDate).reversed())
.collect(Collectors.groupingBy(item -> getYear(item.getDate())));
}