From bcedeaf5d5aaceff2945e5019e1d9b8751d281c1 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 10 Nov 2022 10:36:20 +0100 Subject: [PATCH] code cleanup --- .../session/impl/ExamConfigUpdateServiceImpl.java | 6 +----- .../servicelayer/session/impl/ExamUpdateHandler.java | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamConfigUpdateServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamConfigUpdateServiceImpl.java index 38196264..b5576433 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamConfigUpdateServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamConfigUpdateServiceImpl.java @@ -29,7 +29,6 @@ import ch.ethz.seb.sebserver.gbl.util.Result; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ConfigurationDAO; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ExamConfigurationMapDAO; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ExamDAO; -import ch.ethz.seb.sebserver.webservice.servicelayer.exam.ExamAdminService; import ch.ethz.seb.sebserver.webservice.servicelayer.session.ExamConfigUpdateService; import ch.ethz.seb.sebserver.webservice.servicelayer.session.ExamSessionService; @@ -45,22 +44,19 @@ public class ExamConfigUpdateServiceImpl implements ExamConfigUpdateService { private final ExamConfigurationMapDAO examConfigurationMapDAO; private final ExamSessionService examSessionService; private final ExamUpdateHandler examUpdateHandler; - private final ExamAdminService examAdminService; protected ExamConfigUpdateServiceImpl( final ExamDAO examDAO, final ConfigurationDAO configurationDAO, final ExamConfigurationMapDAO examConfigurationMapDAO, final ExamSessionService examSessionService, - final ExamUpdateHandler examUpdateHandler, - final ExamAdminService examAdminService) { + final ExamUpdateHandler examUpdateHandler) { this.examDAO = examDAO; this.configurationDAO = configurationDAO; this.examConfigurationMapDAO = examConfigurationMapDAO; this.examSessionService = examSessionService; this.examUpdateHandler = examUpdateHandler; - this.examAdminService = examAdminService; } // processing: diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamUpdateHandler.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamUpdateHandler.java index 4c7ce0e4..51bbb203 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamUpdateHandler.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/ExamUpdateHandler.java @@ -338,7 +338,7 @@ class ExamUpdateHandler { } private boolean hasChanges(final Exam exam, final QuizData quizData) { - if (!Objects.equals(exam.name, quizData.name) || + if (Utils.isEqualsWithEmptyCheck(exam.name, quizData.name) || !Objects.equals(exam.startTime, quizData.startTime) || !Objects.equals(exam.endTime, quizData.endTime) || !Utils.isEqualsWithEmptyCheck(exam.getDescription(), quizData.description) ||