diff --git a/conference-impl/src/main/java/org/tweetwallfx/conference/impl/ConferenceClientImpl.java b/conference-impl/src/main/java/org/tweetwallfx/conference/impl/ConferenceClientImpl.java index 318fcde..6631ebf 100644 --- a/conference-impl/src/main/java/org/tweetwallfx/conference/impl/ConferenceClientImpl.java +++ b/conference-impl/src/main/java/org/tweetwallfx/conference/impl/ConferenceClientImpl.java @@ -183,11 +183,18 @@ public List getRatedTalks(final String conferenceDay) { System.out.println("######## randomizedRatedTalksPerDay"); return randomizedRatedTalks(); } else { - return getVotingResults().entrySet().stream() - .filter(e -> e.getKey().dayId().equals(conferenceDay)) - .map(Map.Entry::getValue) - .findFirst() - .orElse(List.of()); + final Map> votingResults = getVotingResults(); + + return votingResults.entrySet().stream() + .filter(e -> e.getKey().dayId().equals(conferenceDay)) + .map(Map.Entry::getValue) + .findFirst() + .orElseGet(() -> { + LOG.warn( + "Lookup of voting results for conferenceDay='{}' failed among the following keySet: {}", + conferenceDay, votingResults.keySet()); + return List.of(); + }); } } @@ -419,7 +426,9 @@ private static T alternatives(final T... ts) { protected static record WeekDay(String dayId) { static WeekDay of(String date) { - return new WeekDay(LocalDate.parse(date).getDayOfWeek().getDisplayName(TextStyle.FULL, Locale.ENGLISH)); + return new WeekDay(LocalDate.parse(date).getDayOfWeek() + .getDisplayName(TextStyle.FULL, Locale.ENGLISH) + .toLowerCase(Locale.ENGLISH)); } } }