From 9c43ff281c89a085934ec12fd6b82144a9bf5bd9 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Fri, 1 Apr 2016 20:49:22 +0300 Subject: [PATCH] Remove stopping JobSchedule executor. It now fails on shutdown attempt. --- .../kotlin/gradle/plugin/CleanUpBuildListener.kt | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/CleanUpBuildListener.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/CleanUpBuildListener.kt index 23ffc0fe62c..0c4b5561d8d 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/CleanUpBuildListener.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/CleanUpBuildListener.kt @@ -129,7 +129,6 @@ class CompilerServicesCleanup(private var pluginClassLoader: ClassLoader?) { if (it < comparableVersionStr("2.4")!!) { // TODO: remove ZipFileCache cleanup after switching to recent idea libs stopZipFileCache() - stopJobScheduler() } } @@ -141,18 +140,6 @@ class CompilerServicesCleanup(private var pluginClassLoader: ClassLoader?) { log.kotlinDebug("ZipFileCache finished successfully") } - private fun stopJobScheduler() { - log.kotlinDebug("Stop JobScheduler") - - val jobSchedulerClass = Class.forName("com.intellij.concurrency.JobScheduler", false, pluginClassLoader) - - val getSchedulerMethod = jobSchedulerClass.getMethod("getScheduler") - val executorService = getSchedulerMethod.invoke(this) as ScheduledExecutorService - - executorService.shutdown() - log.kotlinDebug("JobScheduler stopped") - } - private fun callVoidStaticMethod(classFqName: String, methodName: String) { val shortName = classFqName.substring(classFqName.lastIndexOf('.') + 1)