Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2015-12-24 09:53:56 -0500
committerSarika Sinha2016-01-04 00:28:19 -0500
commit535e4f96bbdf4e793f22d99b2e3fb9fe17267438 (patch)
tree7473dbe25accc18d672333512d924c7c73eb7676 /org.eclipse.debug.core
parentd91efcae543057148210eb78a776790859f635c2 (diff)
downloadeclipse.platform.debug-535e4f96bbdf4e793f22d99b2e3fb9fe17267438.tar.gz
eclipse.platform.debug-535e4f96bbdf4e793f22d99b2e3fb9fe17267438.tar.xz
eclipse.platform.debug-535e4f96bbdf4e793f22d99b2e3fb9fe17267438.zip
Bug 484882: Synchronize access to fSortedConfigNamesI20160112-1800I20160112-0800I20160105-1000I20160105-0800
The new test demonstrates the problem by running two threads, one creating/deleting launch configs, the other one accessing fSortedConfigNames. Note if you set fSortedConfigNames to volatile without making clearConfigNameCache synchronized you can see the test fails generally very fast. Change-Id: I981d7054d51e263f5d097096ffe23cdc1fa74256 Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index 7ecf979fe..4973e3f52 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -589,7 +589,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
/**
* A cache of launch configuration names currently in the workspace.
*/
- private String[] fSortedConfigNames = null;
+ private volatile String[] fSortedConfigNames = null;
/**
* Collection of all launch configurations in the workspace.
@@ -916,7 +916,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
/**
* The launch config name cache is cleared when a config is added, deleted or changed.
*/
- protected void clearConfigNameCache() {
+ protected synchronized void clearConfigNameCache() {
fSortedConfigNames = null;
}

Back to the top