Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimeon Andreev2021-03-29 13:52:41 +0000
committerSimeon Andreev2021-04-08 10:36:47 +0000
commit645c89a7bcfeddb4862d21d8e68d312859426382 (patch)
tree2b198ba7beda14eee146d34436b60e1ee9c0020d
parent89dd1a248f586d1b372c1f04b66417eea91614dc (diff)
downloadeclipse.platform.debug-645c89a7bcfeddb4862d21d8e68d312859426382.tar.gz
eclipse.platform.debug-645c89a7bcfeddb4862d21d8e68d312859426382.tar.xz
eclipse.platform.debug-645c89a7bcfeddb4862d21d8e68d312859426382.zip
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.java2
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();
}
/**

Back to the top