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 Set<String> missingIds = new HashSet<>(ids);
|
||||||
final Collection<QuizData> result = new ArrayList<>();
|
final Collection<QuizData> result = new ArrayList<>();
|
||||||
final Set<String> fromCache = ids.stream()
|
final Set<String> fromCache = ids.stream()
|
||||||
.map(super::getFromCache)
|
.map(id -> super.getFromCache(id))
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.map(qd -> {
|
.map(qd -> {
|
||||||
result.add(qd);
|
result.add(qd);
|
||||||
|
@ -225,7 +225,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme
|
||||||
|
|
||||||
result.addAll(getRestTemplate()
|
result.addAll(getRestTemplate()
|
||||||
.map(template -> getQuizzesForIds(template, ids))
|
.map(template -> getQuizzesForIds(template, ids))
|
||||||
.map(super::putToCache)
|
.map(q -> super.putToCache(q))
|
||||||
.onError(error -> log.error("Failed to get courses for: {}", ids, error))
|
.onError(error -> log.error("Failed to get courses for: {}", ids, error))
|
||||||
.getOrElse(Collections::emptyList));
|
.getOrElse(Collections::emptyList));
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ public class MoodlePluginCourseAccess extends AbstractCachedCourseAccess impleme
|
||||||
final Set<String> ids = Stream.of(id).collect(Collectors.toSet());
|
final Set<String> ids = Stream.of(id).collect(Collectors.toSet());
|
||||||
final Iterator<QuizData> iterator = getRestTemplate()
|
final Iterator<QuizData> iterator = getRestTemplate()
|
||||||
.map(template -> getQuizzesForIds(template, ids))
|
.map(template -> getQuizzesForIds(template, ids))
|
||||||
.map(super::putToCache)
|
.map(q -> super.putToCache(q))
|
||||||
.getOr(Collections.emptyList())
|
.getOr(Collections.emptyList())
|
||||||
.iterator();
|
.iterator();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue