if (lesson != null && summaryType.equals(SummaryType.NORMAL_SUMMARY)) { possibleSummaryDates.addAll(lesson.getPossibleDatesToInsertSummary());
if (summaryType != null && summaryType.equals(SummaryType.NORMAL_SUMMARY)) { if (lesson != null) { possibleSummaryDates.addAll(lesson.getPossibleDatesToInsertSummary()); }  if (summary != null && shift != null && lesson != null && summary.getShift().equals(shift) && summary.getLesson().equals(lesson)) { possibleSummaryDates.add(summary.getSummaryDateYearMonthDay()); } Collections.reverse(possibleSummaryDates);
    public Object provide(Object source, Object currentValue) {	SummariesManagementBean bean = (SummariesManagementBean) source;	Lesson lesson = bean.getLesson();	Shift shift = bean.getShift();	SummaryType summaryType = bean.getSummaryType();	Summary summary = bean.getSummary();	List<YearMonthDay> possibleSummaryDates = new ArrayList<YearMonthDay>();	if (lesson != null && summaryType.equals(SummaryType.NORMAL_SUMMARY)) {	    possibleSummaryDates.addAll(lesson.getPossibleDatesToInsertSummary());	}	if (summary != null && summaryType != null && shift != null && lesson != null		&& summaryType.equals(SummaryType.NORMAL_SUMMARY) && summary.getShift().equals(shift)		&& summary.getLesson().equals(lesson)) {	    possibleSummaryDates.add(bean.getSummaryDate());	}	Collections.reverse(possibleSummaryDates);	return possibleSummaryDates;    }