Merge branch 'develop' of code-repo.d4science.org:MaDgIK/uoa-repository-manager-service into develop

This commit is contained in:
Konstantinos Spyrou 2023-01-12 14:23:57 +02:00
commit af0482a9fb
1 changed files with 1 additions and 4 deletions

View File

@ -67,11 +67,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())));
}