diff --git a/engine/time/src/main/java/io/deephaven/time/calendar/BusinessCalendar.java b/engine/time/src/main/java/io/deephaven/time/calendar/BusinessCalendar.java index 6b47f0029a1..27ed854a2aa 100644 --- a/engine/time/src/main/java/io/deephaven/time/calendar/BusinessCalendar.java +++ b/engine/time/src/main/java/io/deephaven/time/calendar/BusinessCalendar.java @@ -150,8 +150,8 @@ public BusinessCalendar(final String name, final String description, final ZoneI this.firstValidDate = firstValidDate; this.lastValidDate = lastValidDate; this.standardBusinessDay = standardBusinessDay; - this.weekendDays = weekendDays; - this.holidays = holidays; + this.weekendDays = Set.copyOf(weekendDays); + this.holidays = Map.copyOf(holidays); populateSchedules(); populateCachedYearData(); } diff --git a/engine/time/src/main/java/io/deephaven/time/calendar/Calendars.java b/engine/time/src/main/java/io/deephaven/time/calendar/Calendars.java index 231f481e7b6..f4d50afd84a 100644 --- a/engine/time/src/main/java/io/deephaven/time/calendar/Calendars.java +++ b/engine/time/src/main/java/io/deephaven/time/calendar/Calendars.java @@ -67,7 +67,8 @@ private static void load(final String businessCalendarConfig) throws NoSuchFileE final InputStream inputStream = Calendars.class.getResourceAsStream(filePath); if (inputStream != null) { final File calendarFile = inputStreamToFile(inputStream); - final BusinessCalendar businessCalendar = BusinessCalendarXMLParser.loadBusinessCalendar(calendarFile); + final BusinessCalendar businessCalendar = + BusinessCalendarXMLParser.loadBusinessCalendar(calendarFile); addCalendar(businessCalendar); // noinspection ResultOfMethodCallIgnored calendarFile.delete();