removed Java legacy code
All checks were successful
continuous-integration/drone/push Build is passing

the minimum is now Java 11
This commit is contained in:
2019-12-30 01:36:21 +01:00
parent 16cb89ca38
commit d0d5e4b6d1
4 changed files with 8 additions and 27 deletions

View File

@ -128,14 +128,7 @@ class CacheController {
// get all lessons from the weeks timetable
val flatMap = getTimetable(courseName, weekIndex).timetable.days.flatMap { it.timeslots.asIterable() }
flatMap.forEach {
// TODO Java 11
//it.stream().filter { x -> x.lessonSubject.contains(lessonSubject) }.findAny().ifPresent { x -> println("${x.lessonSubject}, ${x.lessonTeacher}") }
it.forEach { lesson ->
if(lesson.lessonSubject.contains(lessonSubject)) {
lessonList.add(lesson)
}
}
it.stream().filter { x -> x.lessonSubject.contains(lessonSubject) }.findAny().ifPresent { x -> lessonList.add(x) }
}
return lessonList