src/macosx/classes/java/util/prefs/MacOSXPreferences.java

Print this page




 211                 throw new BackingStoreException("Synchronization failed for node '" + path + "'");
 212             }
 213         }
 214     }
 215 
 216     // AbstractPreferences implementation
 217     protected void flushSpi()
 218         throws BackingStoreException
 219     {
 220         // nothing here - overridden flush() doesn't call this
 221     }
 222 
 223     // AbstractPreferences override
 224     public void sync()
 225         throws BackingStoreException
 226     {
 227         synchronized(lock) {
 228             if (isRemoved())
 229                 throw new IllegalStateException("Node has been removed");
 230             // fixme! overkill





 231             if (!MacOSXPreferencesFile.syncWorld()) {
 232                 throw new BackingStoreException("Synchronization failed for node '" + path + "'");
 233             }
 234         }
 235     }

 236 
 237     // AbstractPreferences implementation
 238     protected void syncSpi()
 239         throws BackingStoreException
 240     {
 241         // nothing here - overridden sync() doesn't call this
 242     }
 243 }
 244 


 211                 throw new BackingStoreException("Synchronization failed for node '" + path + "'");
 212             }
 213         }
 214     }
 215 
 216     // AbstractPreferences implementation
 217     protected void flushSpi()
 218         throws BackingStoreException
 219     {
 220         // nothing here - overridden flush() doesn't call this
 221     }
 222 
 223     // AbstractPreferences override
 224     public void sync()
 225         throws BackingStoreException
 226     {
 227         synchronized(lock) {
 228             if (isRemoved())
 229                 throw new IllegalStateException("Node has been removed");
 230             // fixme! overkill
 231             if (isUser) {
 232                 if (!MacOSXPreferencesFile.syncUser()) {
 233                     throw new BackingStoreException("Synchronization failed for node '" + path + "'");
 234                 }
 235             } else {
 236                 if (!MacOSXPreferencesFile.syncWorld()) {
 237                     throw new BackingStoreException("Synchronization failed for node '" + path + "'");
 238                 }
 239             }
 240         }
 241     }
 242 
 243     // AbstractPreferences implementation
 244     protected void syncSpi()
 245         throws BackingStoreException
 246     {
 247         // nothing here - overridden sync() doesn't call this
 248     }
 249 }
 250