Throw an exception if no plugin store is available.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 23 Nov 2010 17:30:44 +0000 (18:30 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 24 Nov 2010 07:54:55 +0000 (08:54 +0100)
src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java

index eebfe3e..6815371 100644 (file)
@@ -56,6 +56,9 @@ public class PluginStoreConfigurationBackend implements ExtendedConfigurationBac
        public PluginStoreConfigurationBackend(PluginRespirator pluginRespirator) throws DatabaseDisabledException {
                this.pluginRespirator = pluginRespirator;
                this.pluginStore = pluginRespirator.getStore();
+               if (this.pluginStore == null) {
+                       throw new DatabaseDisabledException();
+               }
        }
 
        /**