InfoExam season1Exam =
(InfoExam) CollectionUtils.find(infoExecutionCourse.getAssociatedInfoExams(), new Predicate() {
@Override
public boolean evaluate(Object obj) {
InfoExam infoExam = (InfoExam) obj;
return infoExam.getSeason().equals(new Season(Season.SEASON1));
}
});
// Get 2nd season exam
InfoExam season2Exam =
(InfoExam) CollectionUtils.find(infoExecutionCourse.getAssociatedInfoExams(), new Predicate() {
@Override
public boolean evaluate(Object obj) {
InfoExam infoExam = (InfoExam) obj;
return infoExam.getSeason().equals(new Season(Season.SEASON2));
}
});
if (user.equals("public")) {
if (season1Exam == null && !hasComment) {