public Date getCalendarEndDate() {
   Date endDate = getExecutionPeriod().getEndDate();
   final ExecutionDegree executionDegree = getExecutionDegree();
   if (executionDegree != null) {
     if (getExecutionPeriod().getSemester().intValue() == 1
         && executionDegree.getPeriodExamsFirstSemester().getEnd() != null) {
       endDate = executionDegree.getPeriodExamsFirstSemester().getEnd();
     } else if (getExecutionPeriod().getSemester().intValue() == 2
         && executionDegree.getPeriodExamsSecondSemester().getEnd() != null) {
       endDate = executionDegree.getPeriodExamsSecondSemester().getEnd();
     }
   }
   return endDate;
 }