fix for java 8 build
This commit is contained in:
parent
e89026591e
commit
01f3517989
1 changed files with 3 additions and 3 deletions
|
@ -213,7 +213,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme
|
|||
final Set<String> missingIds = new HashSet<>(ids);
|
||||
final Collection<QuizData> result = new ArrayList<>();
|
||||
final Set<String> fromCache = ids.stream()
|
||||
.map(super::getFromCache)
|
||||
.map(id -> super.getFromCache(id))
|
||||
.filter(Objects::nonNull)
|
||||
.map(qd -> {
|
||||
result.add(qd);
|
||||
|
@ -225,7 +225,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme
|
|||
|
||||
result.addAll(getRestTemplate()
|
||||
.map(template -> getQuizzesForIds(template, ids))
|
||||
.map(super::putToCache)
|
||||
.map(q -> super.putToCache(q))
|
||||
.onError(error -> log.error("Failed to get courses for: {}", ids, error))
|
||||
.getOrElse(Collections::emptyList));
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme
|
|||
final Set<String> ids = Stream.of(id).collect(Collectors.toSet());
|
||||
final Iterator<QuizData> iterator = getRestTemplate()
|
||||
.map(template -> getQuizzesForIds(template, ids))
|
||||
.map(super::putToCache)
|
||||
.map(q -> super.putToCache(q))
|
||||
.getOr(Collections.emptyList())
|
||||
.iterator();
|
||||
|
||||
|
|
Loading…
Reference in a new issue