develop #1

Merged
antonis.lempesis merged 36 commits from develop into master 2023-01-19 12:41:45 +01:00
1 changed files with 1 additions and 4 deletions
Showing only changes of commit ceb53248ce - Show all commits

View File

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