diff --git a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayManager.java b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayManager.java index 004e086d0..73b7ffb7f 100644 --- a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayManager.java +++ b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/HolidayManager.java @@ -254,18 +254,6 @@ public ManagerParameter getManagerParameter() { return managerParameter; } - /** - * Returns the holidays for the requested year and hierarchy structure. - * - * @param year i.e. 2010 - * @param args i.e. args = {'ny'}. returns US/New York holidays. No args means holidays common to whole country - * @return a set of holidays for the requested year - * - * @deprecated in favor of getHolidays(final Year year, final String... args) - */ - @Deprecated(forRemoval = true, since = "0.31.0") - public abstract Set getHolidays(final int year, final String... args); - /** * Returns the holidays for the requested year and hierarchy structure. * @@ -275,19 +263,6 @@ public ManagerParameter getManagerParameter() { */ public abstract Set getHolidays(final Year year, final String... args); - /** - * Returns the holidays for the requested year, the given {@link HolidayType} and the hierarchy structure - * - * @param year i.e. 2010 - * @param holidayType a {@link HolidayType} to be considered - * @param args i.e. args = {'ny'}. returns US/New York holidays. No args means holidays common to whole country - * @return a set of holidays of the given {@link HolidayType} for the requested year - * - * @deprecated in favor of getHolidays(final Year year, final HolidayType holidayType, final String... args); - */ - @Deprecated(forRemoval = true, since = "0.31.0") - public abstract Set getHolidays(final int year, final HolidayType holidayType, final String... args); - /** * Returns the holidays for the requested year, the given {@link HolidayType} and the hierarchy structure * diff --git a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/DefaultHolidayManager.java b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/DefaultHolidayManager.java index 6e129c34f..217c07717 100644 --- a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/DefaultHolidayManager.java +++ b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/DefaultHolidayManager.java @@ -80,18 +80,6 @@ public void doInit() { logHierarchy(configuration, 0); } - /** - * {@inheritDoc} - *

- * Calls - * Set<LocalDate> getHolidays(Year year, Configuration c, String... args) - * with the configuration from initialization. - */ - @Override - public Set getHolidays(final int year, final String... args) { - return getHolidays(Year.of(year), args); - } - /** * {@inheritDoc} *

@@ -126,14 +114,6 @@ public Set createValue() { return holidayCache.get(holidayValueHandler); } - /** - * {@inheritDoc} - */ - @Override - public Set getHolidays(final int year, final HolidayType holidayType, final String... args) { - return getHolidays(Year.of(year), holidayType, args); - } - /** * {@inheritDoc} */ @@ -157,7 +137,8 @@ public Set getHolidays(final LocalDate startDateInclusive, final LocalD Objects.requireNonNull(endDateInclusive, "endDateInclusive is null"); return rangeClosed(startDateInclusive.getYear(), endDateInclusive.getYear()) - .mapToObj(year -> getHolidays(year, args)) + .mapToObj(Year::of) + .map(year -> getHolidays(year, args)) .flatMap(Collection::stream) .filter(holiday -> !startDateInclusive.isAfter(holiday.getDate()) && !endDateInclusive.isBefore(holiday.getDate())) .collect(toUnmodifiableSet()); diff --git a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java index e25526992..71ef0cc6e 100644 --- a/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java +++ b/jollyday-core/src/main/java/de/focus_shift/jollyday/core/impl/JapaneseHolidayManager.java @@ -21,20 +21,6 @@ public class JapaneseHolidayManager extends DefaultHolidayManager { */ private static final String BRIDGING_HOLIDAY_PROPERTIES_KEY = "BRIDGING_HOLIDAY"; - /** - * {@inheritDoc} - *

- * Implements the rule which requests if two holidays have one non holiday - * between each other than this day is also a holiday. - * - * @deprecated in favor of getHolidays(final Year year, final String... args) - */ - @Deprecated(forRemoval = true, since = "0.31.0") - @Override - public Set getHolidays(final int year, final String... args) { - return getHolidays(Year.of(year), args); - } - /** * {@inheritDoc} *