updated jsoup 1.12.1 -> 1.12.2
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jannik 2020-02-16 15:18:52 +01:00
parent 3aa27dff4a
commit f20279a4b4
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
2 changed files with 8 additions and 7 deletions

View File

@ -17,7 +17,7 @@ dependencies {
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3'
implementation 'org.jsoup:jsoup:1.12.1'
implementation 'org.jsoup:jsoup:1.12.2'
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.0'

View File

@ -129,16 +129,17 @@ class StartupController {
private fun readCachedTimetables() {
dirTcorCache.walkTopDown().forEach {
if (it.isFile && it.name.endsWith(".json")) {
try {
val fileReader = FileReader(it)
val bufferedReader = BufferedReader(fileReader)
val timetableObject = JsonParser.parseString(bufferedReader.readLine()).asJsonObject
try {
val timetableObject = JsonParser.parseString(bufferedReader.readLine()).asJsonObject
CacheController.timetableList.add(Gson().fromJson(timetableObject, TimetableCourseWeek().javaClass))
bufferedReader.close()
fileReader.close()
} catch (ex: Exception) {
logger.error("error while reading cache", ex)
} finally {
bufferedReader.close()
fileReader.close()
}
}
}