IDEA-137488 - CloudFoundry: NPE on undeploy of an application

This commit is contained in:
Michael Golubev
2015-03-11 15:09:03 +01:00
parent 300a885ff0
commit bf4f4371f5
@@ -142,7 +142,8 @@ public class ServerConnectionImpl<D extends DeploymentConfiguration> implements
myLogManagers.put(deploymentName, logManager);
handler.printlnSystemMessage("Deploying '" + deploymentName + "'...");
onDeploymentStarted.run(deploymentName);
instance.deploy(task, logManager, new DeploymentOperationCallbackImpl(deploymentName, (DeploymentTaskImpl<D>)task, handler, deployment));
instance
.deploy(task, logManager, new DeploymentOperationCallbackImpl(deploymentName, (DeploymentTaskImpl<D>)task, handler, deployment));
}
});
}
@@ -290,7 +291,10 @@ public class ServerConnectionImpl<D extends DeploymentConfiguration> implements
}
}
}
myLogManagers.remove(deploymentName).disposeLogs();
DeploymentLogManagerImpl logManager = myLogManagers.remove(deploymentName);
if (logManager != null) {
logManager.disposeLogs();
}
myEventDispatcher.queueDeploymentsChanged(ServerConnectionImpl.this);
computeDeployments(myRuntimeInstance, EmptyRunnable.INSTANCE);
}