if((shift != null && !summary.getShift().equals(shift)) || (teacher != null && !summary.getProfessorship().equals(teacher)) ||
if((shift != null && (summary.getShift() == null || !summary.getShift().equals(shift))) || (teacher != null && (summary.getProfessorship() == null || !summary.getProfessorship().equals(teacher))) ||
    public ActionForward showSummariesPostBack(ActionMapping mapping, ActionForm form,	    HttpServletRequest request, HttpServletResponse response) {		final IViewState viewState = RenderUtils.getViewState();	ShowSummariesBean bean = (ShowSummariesBean) viewState.getMetaObject().getObject();		ExecutionCourse executionCourse = bean.getExecutionCourse();	ShiftType shiftType = bean.getShiftType();	Shift shift = bean.getShift();		SummaryTeacherBean summaryTeacher = bean.getSummaryTeacher();	Professorship teacher = (summaryTeacher != null) ? bean.getSummaryTeacher().getProfessorship() : null;	Boolean otherTeachers = (summaryTeacher != null) ? bean.getSummaryTeacher().getOthers() : null;			Set<Summary> summariesToShow = new TreeSet<Summary>(Summary.COMPARATOR_BY_DATE_AND_HOUR);	for (Summary summary : executionCourse.getAssociatedSummariesSet()) {	    boolean insert = true;	    if((shift != null && !summary.getShift().equals(shift)) ||		    (teacher != null && !summary.getProfessorship().equals(teacher)) ||		    (shiftType != null && !summary.getSummaryType().equals(shiftType)) ||		    (otherTeachers != null && otherTeachers && summary.getProfessorship() != null)) {		insert = false;	    }	    if(insert) {		summariesToShow.add(summary);	    }	}		RenderUtils.invalidateViewState();	request.setAttribute("showSummariesBean", bean);	request.setAttribute("summaries", summariesToShow);	return mapping.findForward("prepareShowSummaries");    }    