mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
jdks - minor cleanup, resolve note
IDEA-225308 GitOrigin-RevId: 5b01b2fa3143c18bb3c26dc9f38aab8d17342e71
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7932f60c1a
commit
856fdacfdb
@@ -91,8 +91,7 @@ class JDKDownloader {
|
||||
}
|
||||
|
||||
fun downloadModel(progress: ProgressIndicator?): JDKDownloadModel {
|
||||
//use HTTP caches here, in-memory only
|
||||
//note we use 3 copies of data here: String, JSON and Model (first two should GC)
|
||||
//the file is ~15k, in-memory only via JSON tree, no caches needed
|
||||
val rawData = HttpRequests.request(feedUrl).forceHttps(true).readString(progress)
|
||||
val tree = om.readTree(rawData) as? ObjectNode ?: error("Unexpected JSON data")
|
||||
val items = tree["jdks"] as? ArrayNode ?: error("`jdks` element is missing")
|
||||
|
||||
Reference in New Issue
Block a user