Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2019-06-17 09:39:34 +0000
committerSarika Sinha2019-06-18 04:27:50 +0000
commitc642e98e154c4b8b34d3cab4023cee1ad2f3cb35 (patch)
tree02f9ad22106f704d54c96322d50346853cc42644
parentc30c143d1144602652398e3d76a803445f28efa5 (diff)
downloadeclipse.platform.debug-c642e98e154c4b8b34d3cab4023cee1ad2f3cb35.tar.gz
eclipse.platform.debug-c642e98e154c4b8b34d3cab4023cee1ad2f3cb35.tar.xz
eclipse.platform.debug-c642e98e154c4b8b34d3cab4023cee1ad2f3cb35.zip
Bug 446151 - Dead lock while startingI20190618-0225
Change-Id: I7030b4b58b88cd278add760ac18bf7beccaeee90 Signed-off-by: Sarika Sinha <sarika.sinha@in.ibm.com>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
index dcfc2e279..817aa1906 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2013 IBM Corporation and others.
+ * Copyright (c) 2006, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -65,11 +65,16 @@ public class DebugCommandService implements IDebugContextListener {
* @param window the window
* @return service
*/
- public synchronized static DebugCommandService getService(IWorkbenchWindow window) {
+ public static DebugCommandService getService(IWorkbenchWindow window) {
DebugCommandService service = fgServices.get(window);
if (service == null) {
- service = new DebugCommandService(window);
- fgServices.put(window, service);
+ synchronized (fgServices) {
+ service = fgServices.get(window);
+ if (service == null) {
+ service = new DebugCommandService(window);
+ fgServices.put(window, service);
+ }
+ }
}
return service;
}

Back to the top