diff options
author | Simeon Andreev | 2021-03-29 13:52:41 +0000 |
---|---|---|
committer | Simeon Andreev | 2021-04-08 10:36:47 +0000 |
commit | 645c89a7bcfeddb4862d21d8e68d312859426382 (patch) | |
tree | 2b198ba7beda14eee146d34436b60e1ee9c0020d | |
parent | 89dd1a248f586d1b372c1f04b66417eea91614dc (diff) | |
download | eclipse.platform.debug-645c89a7bcfeddb4862d21d8e68d312859426382.tar.gz eclipse.platform.debug-645c89a7bcfeddb4862d21d8e68d312859426382.tar.xz eclipse.platform.debug-645c89a7bcfeddb4862d21d8e68d312859426382.zip |
Bug 572404 - synchronize access PerspectiveManager.fPerspectiveContextsI20210412-2130I20210412-1800I20210411-1800I20210410-1800I20210410-0630I20210409-2140I20210409-1800
Creating a project while opening e.g. a console page can result in
concurrent PerspectiveManager.startup() and PerspectiveManager.saving().
This can cause a NullPointerException or a
ConcurrentModificationException, with bad timing.
This change moves the initPerspectives() call to before listeners are
registered in startup(). This avoids the race condition.
Change-Id: I1fc2300217a7b4832e8eb33bce14b0e4847112cb
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java index 75c153edb..7466647b4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java @@ -281,9 +281,9 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe * launches to be registered. */ public void startup() { + initPerspectives(); DebugUIPlugin.getDefault().addSaveParticipant(this); DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); - initPerspectives(); } /** |