updated jsoup 1.12.1 -> 1.12.2
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
3aa27dff4a
commit
f20279a4b4
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
val fileReader = FileReader(it)
|
||||
val bufferedReader = BufferedReader(fileReader)
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue