From: David ‘Bombe’ Roden Date: Tue, 23 Nov 2010 17:30:44 +0000 (+0100) Subject: Throw an exception if no plugin store is available. X-Git-Tag: 0.3.1-RC1~43 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=ae86f20b9267b6ea04b61da01f12bca742b35eba Throw an exception if no plugin store is available. --- diff --git a/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java b/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java index eebfe3e..6815371 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java +++ b/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java @@ -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(); + } } /**