Skip to content

Commit

Permalink
refactor: 개행 및 EmptyList 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
BGuga committed May 15, 2024
1 parent 7388c0a commit e8c4932
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.festago.festival.repository.SchoolFestivalSearchV1QueryDslRepository;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.EnumMap;
import java.util.List;
Expand Down Expand Up @@ -43,15 +44,16 @@ private List<FestivalSearchV1Response> sortFestival(List<FestivalSearchV1Respons
List<FestivalSearchV1Response> result = new ArrayList<>();
for (FestivalFilter festivalFilter : determineFestivalOrder()) {
List<FestivalSearchV1Response> festivalsByFilter = festivalByStatus.getOrDefault(festivalFilter,
new ArrayList<>());
Collections.emptyList());
sortByStatus(festivalFilter, festivalsByFilter);
result.addAll(festivalsByFilter);
}
return result;
}

private Map<FestivalFilter, List<FestivalSearchV1Response>> divideByStatus(
List<FestivalSearchV1Response> festivals) {
List<FestivalSearchV1Response> festivals
) {
return festivals.stream()
.collect(Collectors.groupingBy(
this::determineStatus,
Expand Down

0 comments on commit e8c4932

Please sign in to comment.