You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interface DayCount:
public abstract int days(LocalDate firstDate, LocalDate secondDate):
It says "Params:
firstDate – the first date secondDate – the second date, which may be before the first date"
but at DayCount implementation StandardDayCounts days method does not allow arbitrary args order so second date can not be before the first date anymore
@Override public int days(LocalDate firstDate, LocalDate secondDate) { if (secondDate.isBefore(firstDate)) { throw new IllegalArgumentException("Dates must be in time-line order"); } return calculateDays(firstDate, secondDate); }
The text was updated successfully, but these errors were encountered:
Hello! Probably have found some inconsistency.
interface DayCount:
public abstract int days(LocalDate firstDate, LocalDate secondDate):
It says "Params:
firstDate – the first date secondDate – the second date, which may be before the first date"
but at DayCount implementation StandardDayCounts days method does not allow arbitrary args order so second date can not be before the first date anymore
@Override public int days(LocalDate firstDate, LocalDate secondDate) { if (secondDate.isBefore(firstDate)) { throw new IllegalArgumentException("Dates must be in time-line order"); } return calculateDays(firstDate, secondDate); }
The text was updated successfully, but these errors were encountered: