fixed for Java 8

This commit is contained in:
anhefti 2022-01-25 15:08:11 +01:00
parent 34fe5ba43f
commit f63fd6ed2a

View file

@ -376,7 +376,7 @@ public class ExamConfigurationMapDAOImpl implements ExamConfigurationMapDAO {
@Override @Override
@Transactional(readOnly = true) @Transactional(readOnly = true)
public Result<Boolean> checkForDeletion(final Long configurationNodeId) { public Result<Boolean> checkForDeletion(final Long configurationNodeId) {
return Result.tryCatch(() -> this.examConfigurationMapRecordMapper.selectByExample() return Result.tryCatch(() -> !this.examConfigurationMapRecordMapper.selectByExample()
.where( .where(
ExamConfigurationMapRecordDynamicSqlSupport.configurationNodeId, ExamConfigurationMapRecordDynamicSqlSupport.configurationNodeId,
isEqualTo(configurationNodeId)) isEqualTo(configurationNodeId))
@ -385,7 +385,7 @@ public class ExamConfigurationMapDAOImpl implements ExamConfigurationMapDAO {
.stream() .stream()
.filter(rec -> !isExamFinished(rec.getExamId())) .filter(rec -> !isExamFinished(rec.getExamId()))
.findFirst() .findFirst()
.isEmpty()); .isPresent());
} }
private boolean isExamFinished(final Long examId) { private boolean isExamFinished(final Long examId) {