From 96ce3ac3a7acc01c1551c765442a435461016b06 Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 21 Dec 2022 09:57:50 +0100 Subject: [PATCH] fixed compile error --- .../lms/impl/moodle/plugin/MoodlePluginCourseAccess.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java index a8ee123d..6bc7acb5 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/moodle/plugin/MoodlePluginCourseAccess.java @@ -197,7 +197,8 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme final Set missingIds = new HashSet<>(ids); final Collection result = new ArrayList<>(); final Set fromCache = ids.stream() - .map(super::getFromCache).filter(Objects::nonNull) + .map(id -> super.getFromCache(id)) + .filter(Objects::nonNull) .map(qd -> { result.add(qd); return qd.id; @@ -208,7 +209,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme result.addAll(getRestTemplate() .map(template -> getQuizzesForIds(template, ids)) - .map(super::putToCache) + .map(qd -> super.putToCache(qd)) .onError(error -> log.error("Failed to get courses for: {}", ids, error)) .getOrElse(() -> Collections.emptyList())); } @@ -229,7 +230,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme final Set ids = Stream.of(id).collect(Collectors.toSet()); final Iterator iterator = getRestTemplate() .map(template -> getQuizzesForIds(template, ids)) - .map(super::putToCache) + .map(qd -> super.putToCache(qd)) .getOr(Collections.emptyList()) .iterator();