} else {
} else if (executionPeriod != null){
    public Date getCalendarEndDate() throws FenixFilterException, FenixServiceException {        final ExecutionPeriod executionPeriod = getExecutionPeriod();        final String evaluationTypeClassname = getEvaluationTypeClassname();        final StudentCurricularPlan studentCurricularPlan = getStudent().getActiveStudentCurricularPlan();        final DegreeCurricularPlan degreeCurricularPlan = (studentCurricularPlan != null) ? studentCurricularPlan.getDegreeCurricularPlan() : null;        final ExecutionDegree executionDegree = findExecutinDegree(degreeCurricularPlan, executionPeriod);        if (evaluationTypeClassname == null || evaluationTypeClassname.length() == 0 || executionDegree == null) {        	if (executionDegree != null && executionPeriod.getSemester().intValue() == 1 && executionDegree.getPeriodExamsFirstSemester() != null) {        		return executionDegree.getPeriodExamsFirstSemester().getEnd();        	} else if (executionDegree != null && executionPeriod.getSemester().intValue() == 2 && executionDegree.getPeriodExamsSecondSemester() != null) {        		return executionDegree.getPeriodExamsSecondSemester().getEnd();        	} else {        		return executionPeriod.getEndDate();        	}        } else {            if (evaluationTypeClassname.equals(Exam.class.getName())) {                if (executionPeriod.getSemester().intValue() == 1) {                    return executionDegree.getPeriodExamsFirstSemester().getEnd();                } else if (executionPeriod.getSemester().intValue() == 2) {                    return executionDegree.getPeriodExamsSecondSemester().getEnd();                }            } else if (evaluationTypeClassname.equals(WrittenTest.class.getName())                    || evaluationTypeClassname.equals(Project.class.getName())) {                if (executionPeriod.getSemester().intValue() == 1) {                    return executionDegree.getPeriodLessonsFirstSemester().getEnd();                } else if (executionPeriod.getSemester().intValue() == 2) {                    return executionDegree.getPeriodLessonsSecondSemester().getEnd();                }            }        }        return null;    }