From 3a3ffbdf6a9b9bcf32f3283e2673a1d3865207a6 Mon Sep 17 00:00:00 2001 From: "Vadim.Mishenev" Date: Fri, 4 Oct 2024 12:11:20 +0300 Subject: [PATCH] Dispose Global Standalone Application Services --- .../org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt | 6 ++++++ .../analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt index 8a322a7466..dcab2d92a1 100644 --- a/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt +++ b/dokka-subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt @@ -71,6 +71,12 @@ public class JavaAnalysisPlugin : DokkaPlugin() { DocCommentFinder(logger, docCommentFactory) } + @InternalDokkaApi + public fun disposeGlobalStandaloneApplicationServices() { + @Suppress("UnstableApiUsage") + com.intellij.util.concurrency.AppExecutorUtil.shutdownApplicationScheduledExecutorService() + } + internal val javaDocCommentCreator by extending { docCommentCreators providing { JavaDocCommentCreator() } } diff --git a/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt index 5c5cf233f2..441ece84af 100644 --- a/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt +++ b/dokka-subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/plugin/SymbolsAnalysisPlugin.kt @@ -42,7 +42,10 @@ public class SymbolsAnalysisPlugin : DokkaPlugin() { } internal val disposeKotlinAnalysisPostAction by extending { - CoreExtensions.postActions with PostAction { querySingle { kotlinAnalysis }.close() } + CoreExtensions.postActions with PostAction { + querySingle { kotlinAnalysis }.close() + javaAnalysisPlugin.disposeGlobalStandaloneApplicationServices() + } } internal val symbolToDocumentableTranslator by extending {