X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2FPluginStoreConfigurationBackend.java;h=94a26900ebfad8663ab569ecaec0e2ed815d21b0;hb=5723a2bb28376b0972a63bae2124846116cf6ca5;hp=68153710c18fa71c5d017a6267069ec98adb3653;hpb=ae86f20b9267b6ea04b61da01f12bca742b35eba;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java b/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java index 6815371..94a2690 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java +++ b/src/main/java/net/pterodactylus/sone/freenet/PluginStoreConfigurationBackend.java @@ -1,5 +1,5 @@ /* - * FreenetSone - PluginStoreConfigurationBackend.java - Copyright © 2010 David Roden + * Sone - PluginStoreConfigurationBackend.java - Copyright © 2010–2012 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,6 @@ package net.pterodactylus.sone.freenet; -import java.util.logging.Level; import java.util.logging.Logger; import net.pterodactylus.util.config.AttributeNotFoundException; @@ -37,6 +36,7 @@ import freenet.pluginmanager.PluginStore; public class PluginStoreConfigurationBackend implements ExtendedConfigurationBackend { /** The logger. */ + @SuppressWarnings("unused") private static final Logger logger = Logging.getLogger(PluginStoreConfigurationBackend.class); /** The plugin respirator. */ @@ -169,18 +169,15 @@ public class PluginStoreConfigurationBackend implements ExtendedConfigurationBac save(); } - // - // PRIVATE METHODS - // - /** - * Saves the configuration to the plugin store. + * {@inheritDoc} */ - private void save() { + @Override + public void save() throws ConfigurationException { try { pluginRespirator.putStore(pluginStore); } catch (DatabaseDisabledException dde1) { - logger.log(Level.WARNING, "Could not store plugin store, database is disabled.", dde1); + throw new ConfigurationException("Could not store plugin store, database is disabled.", dde1); } }