From f63fd6ed2a79bebb910d9ac60fdb56f522948d41 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 25 Jan 2022 15:08:11 +0100 Subject: [PATCH] fixed for Java 8 --- .../servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java index c4e60691..f965f8a9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java @@ -376,7 +376,7 @@ public class ExamConfigurationMapDAOImpl implements ExamConfigurationMapDAO { @Override @Transactional(readOnly = true) public Result checkForDeletion(final Long configurationNodeId) { - return Result.tryCatch(() -> this.examConfigurationMapRecordMapper.selectByExample() + return Result.tryCatch(() -> !this.examConfigurationMapRecordMapper.selectByExample() .where( ExamConfigurationMapRecordDynamicSqlSupport.configurationNodeId, isEqualTo(configurationNodeId)) @@ -385,7 +385,7 @@ public class ExamConfigurationMapDAOImpl implements ExamConfigurationMapDAO { .stream() .filter(rec -> !isExamFinished(rec.getExamId())) .findFirst() - .isEmpty()); + .isPresent()); } private boolean isExamFinished(final Long examId) {