diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java | 13 |
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; } |