Skip to content

Commit

Permalink
use EnumMap
Browse files Browse the repository at this point in the history
  • Loading branch information
bseber committed Dec 28, 2023
1 parent 6f4c60f commit b393a4e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import java.time.LocalDate;
import java.util.Collection;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;

Expand All @@ -24,7 +24,7 @@ class PublicHolidaysServiceImpl implements PublicHolidaysService {
public Map<FederalState, PublicHolidayCalendar> getPublicHolidays(LocalDate from, LocalDate toExclusive, Collection<FederalState> federalStates) {

final LocalDate to = toExclusive.minusDays(1);
final Map<FederalState, PublicHolidayCalendar> calendar = new HashMap<>();
final Map<FederalState, PublicHolidayCalendar> calendar = new EnumMap<>(FederalState.class);

for (FederalState federalState : federalStates) {
if (federalState != FederalState.NONE) {
Expand Down

0 comments on commit b393a4e

Please sign in to comment.