--- a/jdk/src/macosx/classes/java/util/prefs/MacOSXPreferences.java Tue Jul 24 12:17:39 2012 -0700
+++ b/jdk/src/macosx/classes/java/util/prefs/MacOSXPreferences.java Tue Jul 24 13:38:50 2012 -0700
@@ -221,9 +221,14 @@
// Flush should *not* check for removal, unlike sync, but should
// prevent simultaneous removal.
synchronized(lock) {
- // fixme! overkill
- if (!MacOSXPreferencesFile.flushWorld()) {
- throw new BackingStoreException("Synchronization failed for node '" + path + "'");
+ if (isUser) {
+ if (!MacOSXPreferencesFile.flushUser()) {
+ throw new BackingStoreException("Synchronization failed for node '" + path + "'");
+ }
+ } else {
+ if (!MacOSXPreferencesFile.flushWorld()) {
+ throw new BackingStoreException("Synchronization failed for node '" + path + "'");
+ }
}
}
}