mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
QD-8704 adding a WARN message in case application was already disposed when a close project callback is executed
(cherry picked from commit a7808b1c0d602604e58e5d39129d03c888816d69) GitOrigin-RevId: 54b61aa4b0f99ffcdbc3c87221ff8ff80e7c0a63
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6c3d7dfd32
commit
00f908a5f1
+8
-3
@@ -78,9 +78,14 @@ open class MavenServerConnectorImpl(project: Project,
|
||||
mySupport = factory.create(jdk, vmOptions, mavenDistribution, project, myDebugPort)
|
||||
mySupport!!.onTerminate(Consumer {
|
||||
MavenLog.LOG.debug("[connector] terminate " + this@MavenServerConnectorImpl)
|
||||
val mavenServerManager = ApplicationManager.getApplication()?.getServiceIfCreated(
|
||||
MavenServerManager::class.java)
|
||||
mavenServerManager?.shutdownConnector(this@MavenServerConnectorImpl, false)
|
||||
val application = ApplicationManager.getApplication()
|
||||
if (application == null) {
|
||||
MavenLog.LOG.warn("[connector] application is already disposed")
|
||||
}
|
||||
else {
|
||||
val mavenServerManager = application.getServiceIfCreated(MavenServerManager::class.java)
|
||||
mavenServerManager?.shutdownConnector(this@MavenServerConnectorImpl, false)
|
||||
}
|
||||
})
|
||||
// the computation below spawns an immortal server that will not terminate
|
||||
// if someone is interested in the termination of the current computation, they do not need to wait for maven to terminate.
|
||||
|
||||
Reference in New Issue
Block a user