From 9a29a82abbb4f5ae89004bf755ca8cf085daa7bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 23 Nov 2010 13:31:00 +0100 Subject: [PATCH] Use a Map-based configuration backend, get rid of XML. --- src/main/java/net/pterodactylus/sone/main/SonePlugin.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index 6d9e3a0..18a9a52 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -18,7 +18,6 @@ package net.pterodactylus.sone.main; import java.io.File; -import java.util.Collections; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; @@ -33,7 +32,6 @@ import net.pterodactylus.sone.web.WebInterface; import net.pterodactylus.util.config.Configuration; import net.pterodactylus.util.config.ConfigurationException; import net.pterodactylus.util.config.MapConfigurationBackend; -import net.pterodactylus.util.config.XMLConfigurationBackend; import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.logging.LoggingListener; import net.pterodactylus.util.version.Version; @@ -150,11 +148,11 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 Configuration configuration; Configuration xmlConfiguration = null; try { - configuration = new Configuration(new XMLConfigurationBackend(new File("sone.xml"), false)); + configuration = new Configuration(new MapConfigurationBackend(new File("sone.xml"), false)); xmlConfiguration = configuration; } catch (ConfigurationException ce1) { try { - xmlConfiguration = new Configuration(new XMLConfigurationBackend(new File("sone.xml"), true)); + xmlConfiguration = new Configuration(new MapConfigurationBackend(new File("sone.xml"), true)); } catch (ConfigurationException ce2) { logger.log(Level.SEVERE, "Could not create XML file, using Plugin Store!"); } @@ -162,7 +160,7 @@ public class SonePlugin implements FredPlugin, FredPluginL10n, FredPluginBaseL10 configuration = new Configuration(new PluginStoreConfigurationBackend(pluginRespirator)); } catch (DatabaseDisabledException dde1) { logger.log(Level.SEVERE, "Could not load any configuration, using in-memory configuration!"); - configuration = new Configuration(new MapConfigurationBackend(Collections. emptyMap())); + configuration = new Configuration(new MapConfigurationBackend()); } } -- 2.7.4