diff -r c404a87db5b7 -r 74139325d305 src/org/sonews/storage/StorageManager.java --- a/src/org/sonews/storage/StorageManager.java Sun Aug 29 17:43:58 2010 +0200 +++ b/src/org/sonews/storage/StorageManager.java Sun Aug 29 18:17:37 2010 +0200 @@ -26,64 +26,53 @@ public final class StorageManager { - private static StorageProvider provider; + private static StorageProvider provider; - public static Storage current() - throws StorageBackendException - { - synchronized(StorageManager.class) - { - if(provider == null) - { - return null; - } - else - { - return provider.storage(Thread.currentThread()); - } - } - } + public static Storage current() + throws StorageBackendException + { + synchronized (StorageManager.class) { + if (provider == null) { + return null; + } else { + return provider.storage(Thread.currentThread()); + } + } + } - public static StorageProvider loadProvider(String pluginClassName) - { - try - { - Class clazz = Class.forName(pluginClassName); - Object inst = clazz.newInstance(); - return (StorageProvider)inst; - } - catch(Exception ex) - { - System.err.println(ex); - return null; - } - } + public static StorageProvider loadProvider(String pluginClassName) + { + try { + Class clazz = Class.forName(pluginClassName); + Object inst = clazz.newInstance(); + return (StorageProvider) inst; + } catch (Exception ex) { + System.err.println(ex); + return null; + } + } - /** - * Sets the current storage provider. - * @param provider - */ - public static void enableProvider(StorageProvider provider) - { - synchronized(StorageManager.class) - { - if(StorageManager.provider != null) - { - disableProvider(); - } - StorageManager.provider = provider; - } - } + /** + * Sets the current storage provider. + * @param provider + */ + public static void enableProvider(StorageProvider provider) + { + synchronized (StorageManager.class) { + if (StorageManager.provider != null) { + disableProvider(); + } + StorageManager.provider = provider; + } + } - /** - * Disables the current provider. - */ - public static void disableProvider() - { - synchronized(StorageManager.class) - { - provider = null; - } - } - + /** + * Disables the current provider. + */ + public static void disableProvider() + { + synchronized (StorageManager.class) { + provider = null; + } + } }