use HashMap insted of ArrayList to store the timetables
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -134,7 +134,8 @@ class StartupController {
|
||||
|
||||
try {
|
||||
val timetableObject = JsonParser.parseString(bufferedReader.readLine()).asJsonObject
|
||||
CacheController.timetableList.add(Gson().fromJson(timetableObject, TimetableCourseWeek().javaClass))
|
||||
val timetable = Gson().fromJson(timetableObject, TimetableCourseWeek().javaClass)
|
||||
CacheController.timetableList.put("${timetable.meta.courseName}-${timetable.meta.weekIndex}", timetable)
|
||||
} catch (ex: Exception) {
|
||||
logger.error("error while reading cache", ex)
|
||||
} finally {
|
||||
|
Reference in New Issue
Block a user