Skip to content

Commit

Permalink
Closes Taskana#2521 - Fix code smells Stream.collect(Collectors.toLis…
Browse files Browse the repository at this point in the history
…t()) to Stream.toList()
  • Loading branch information
mmenv committed Mar 5, 2024
1 parent c65e100 commit e0236a7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;
import pro.taskana.common.api.exceptions.InvalidArgumentException;
Expand Down Expand Up @@ -186,7 +185,7 @@ ReportRepresentationModel toReportResource(Report<I, H> report, Instant time) {
.sorted(Comparator.comparing(e -> e.getKey().toLowerCase()))
.map(i -> transformRow(i, new String[report.getRowDesc().length], 0))
.flatMap(Collection::stream)
.collect(Collectors.toList());
.toList();

List<RowRepresentationModel> sumRow =
transformRow(report.getSumRow(), new String[report.getRowDesc().length], 0);
Expand Down

0 comments on commit e0236a7

Please sign in to comment.