mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-224736 jdk: fix NPE in JdkDownloadService
#IJPL-224736 Fixed (cherry picked from commit 347cfdd61f3487d9fb051e56d05666ccc7a8fcfc) IJ-CR-192462 GitOrigin-RevId: 0d3c70a7c4393a8893d3a7f850e52c80a90713e9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a2705983f8
commit
78e137fd67
@@ -35,9 +35,9 @@ class JdkDownloadService(private val project: Project, private val coroutineScop
|
||||
}
|
||||
}
|
||||
|
||||
fun scheduleDownloadSdk(sdk: Sdk): CompletableFuture<Boolean> {
|
||||
fun scheduleDownloadSdk(sdk: Sdk?): CompletableFuture<Boolean> {
|
||||
return coroutineScope.async {
|
||||
if (!SdkDownloadTracker.getInstance().isDownloading(sdk)) return@async false
|
||||
if (sdk == null || !SdkDownloadTracker.getInstance().isDownloading(sdk)) return@async false
|
||||
withBackgroundProgress(project, JavaUiBundle.message("progress.title.downloading", sdk.name)) {
|
||||
JdkDownloadUtil.downloadSdk(sdk)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user