The dates can be null so it must be checked

FEA: ItEr61S05BugFixing
This commit is contained in:
Óscar González Fernández 2010-10-03 13:34:20 +02:00
parent 31e2a04c87
commit 2858d29547

View file

@ -736,8 +736,10 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
endDate = Collections.max(notNull(endDate, each.getDeadline(),
associatedTaskElement.getEndDate()));
}
filterStartDate = LocalDate.fromDateFields(startDate);
filterFinishDate = LocalDate.fromDateFields(endDate);
filterStartDate = startDate != null ? LocalDate
.fromDateFields(startDate) : null;
filterFinishDate = endDate != null ? LocalDate.fromDateFields(endDate)
: null;
}
private static <T> List<T> notNull(T... values) {