Fixed possible OutOfBoundsException
FEA: ItEr74S04BugFixing
This commit is contained in:
parent
938a6d852e
commit
51d4f8594b
1 changed files with 3 additions and 0 deletions
|
|
@ -221,6 +221,9 @@ public class StretchesFunctionModel implements IStretchesFunctionModel {
|
|||
private static boolean theFirstIntervalIsPosteriorToFirstDay(
|
||||
List<Stretch> stretches, LocalDate start) {
|
||||
List<Interval> intervals = StretchesFunction.intervalsFor(stretches);
|
||||
if (intervals.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
Interval first = intervals.get(0);
|
||||
return first.getEnd().compareTo(start) > 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue