Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2016-11-29 15:30:21 +0000
committerThomas Watson2016-11-29 18:28:37 +0000
commit1d3b01d9c5aed305b8280d281dc165f1b3cd0cb1 (patch)
treeab822584feb1edb36ed2ffd84badad475e332858 /bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java
parent1a0a0068fc8c3997f73bea9d60f7365855291435 (diff)
downloadrt.equinox.bundles-1d3b01d9c5aed305b8280d281dc165f1b3cd0cb1.tar.gz
rt.equinox.bundles-1d3b01d9c5aed305b8280d281dc165f1b3cd0cb1.tar.xz
rt.equinox.bundles-1d3b01d9c5aed305b8280d281dc165f1b3cd0cb1.zip
"Initializing workspace." Fixes multiple possible race conditions during initialization of instance location uncovered by the change in ResourcesPlugin initialization via commit 8d90fb030df310a974aae5d27d0bc2610c1a14ad. The original issue from bug 507092 is fixed in Activator.getInstanceLocation(), see 507092 comment 27. The change in MetaDataKeeper makes sure every thread uses same DataArea instance, and the change in DataArea.assertLocationInitialized() makes sure the critical file I/O operations on the metadata folder aren't executed in parallel by multiple threads. Change-Id: I4ce3ec522b9ef1be41143d52dc440668a958fbcd Signed-off-by: Andrey Loskutov <loskutov@gmx.de> Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java')
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java
index 66d9feee7..3db52a1bc 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/DataArea.java
@@ -39,7 +39,7 @@ public class DataArea {
private IPath location; //The location of the instance data
private boolean initialized = false;
- protected void assertLocationInitialized() throws IllegalStateException {
+ protected synchronized void assertLocationInitialized() throws IllegalStateException {
if (location != null && initialized)
return;
Activator activator = Activator.getDefault();

Back to the top