code cleanup

This commit is contained in:
anhefti 2022-06-09 14:37:47 +02:00
parent a79a5f87a0
commit bfe15f794a
2 changed files with 4 additions and 3 deletions

View file

@ -159,7 +159,7 @@ public class LmsSetupDAOImpl implements LmsSetupDAO {
} }
return lmsSetup.updateTime.equals(record.getUpdateTime()); return lmsSetup.updateTime.equals(record.getUpdateTime());
} catch (final Exception e) { } catch (final Exception e) {
log.error("Failed to check snyc on LmsSetup: {}", lmsSetup); log.error("Failed to check sync on LmsSetup: {}", lmsSetup);
return false; return false;
} }
} }

View file

@ -93,8 +93,9 @@ public class LmsAPIServiceImpl implements LmsAPIService {
log.debug("LmsSetup changed. Update cache by removing eventually used references"); log.debug("LmsSetup changed. Update cache by removing eventually used references");
} }
final LmsAPITemplate removedTemplate = this.cache final LmsAPITemplate removedTemplate = this.cache.remove(
.remove(new CacheKey(lmsSetup.getModelId(), 0)); new CacheKey(lmsSetup.getModelId(), 0));
if (removedTemplate != null) { if (removedTemplate != null) {
removedTemplate.clearCourseCache(); removedTemplate.clearCourseCache();
} }