diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java index 4a69787c..8f11855d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/LmsSetupDAOImpl.java @@ -159,7 +159,7 @@ public class LmsSetupDAOImpl implements LmsSetupDAO { } return lmsSetup.updateTime.equals(record.getUpdateTime()); } catch (final Exception e) { - log.error("Failed to check snyc on LmsSetup: {}", lmsSetup); + log.error("Failed to check sync on LmsSetup: {}", lmsSetup); return false; } } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java index cc20ce79..8fa65052 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsAPIServiceImpl.java @@ -93,8 +93,9 @@ public class LmsAPIServiceImpl implements LmsAPIService { log.debug("LmsSetup changed. Update cache by removing eventually used references"); } - final LmsAPITemplate removedTemplate = this.cache - .remove(new CacheKey(lmsSetup.getModelId(), 0)); + final LmsAPITemplate removedTemplate = this.cache.remove( + new CacheKey(lmsSetup.getModelId(), 0)); + if (removedTemplate != null) { removedTemplate.clearCourseCache(); }