stefanuebe/vaadin-fullcalendar

mistake in the Entry's getRecurringStart() method comment

Closed this issue · 1 comments

The comment on the getRecurringStart() method in Entry class mistakenly says that the method throws an exception.

/**
 * Returns the recurring start. This method is a shortcut for combining {@link #getRecurringStartDate()}
 * and {@link #getRecurringStartTimeAsLocalTime()}. <br>
 * Will return null, when no recurrence date is defined. When only
 * a start date is defined, the returned date time will be at the start of that day.
 * <br>
 * In case that the recurring start time is 24h or greater, the date part will shift depending on the
 * resulting additional days. See {@link LocalDateTime#plusHours(long)}.
 *
 * @return start date time of recurrence
 * @throws DateTimeException if the start time represents a time of 24 hours or above.
 * @see #isRecurring()
 */


public LocalDateTime getRecurringStart() {
    LocalDate startDate = getRecurringStartDate();
    if (startDate == null) {
        return null;
    }

    RecurringTime startTime = getRecurringStartTime();
    if (startTime == null) {
        return startDate.atStartOfDay();
    }

    return startDate.atStartOfDay().plusHours(startTime.getHour()).plusMinutes(startTime.getMinute());
}

Yep, that is an outdated artifact from older times. I'll update that.