Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordj2011-10-05 19:27:46 +0000
committerdj2011-10-05 19:27:46 +0000
commit87de8bd7f8c08c359e7278811db55f9a95c0d1cc (patch)
tree74b5bc0f91967d296240f99db816f1382602474b /bundles/org.eclipse.equinox.preferences
parent724c0fdbfe45fefab00308c81d147780a1a13828 (diff)
downloadrt.equinox.bundles-87de8bd7f8c08c359e7278811db55f9a95c0d1cc.tar.gz
rt.equinox.bundles-87de8bd7f8c08c359e7278811db55f9a95c0d1cc.tar.xz
rt.equinox.bundles-87de8bd7f8c08c359e7278811db55f9a95c0d1cc.zip
Bug 333726 - [prefs] EclipsePreferences#flush synchronization problems
Diffstat (limited to 'bundles/org.eclipse.equinox.preferences')
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java
index b35f6cac..ae832fc4 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java
@@ -401,7 +401,15 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#flush()
*/
- public void flush() throws BackingStoreException {
+ synchronized public void flush() throws BackingStoreException {
+ internalFlush();
+ }
+
+ /*
+ * Do the real flushing in a non-synchronized internal method so sub-classes
+ * (mainly ProjectPreferences and ProfilePreferences) don't cause deadlocks.
+ */
+ protected void internalFlush() throws BackingStoreException {
// illegal state if this node has been removed
checkRemoved();

Back to the top