From 84f7859ca96ee475afe9544ce7ff9b69aee939e4 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 14 Aug 2012 13:26:02 +0100 Subject: Fix an error with Logging set to 'OFF' triggering a cast exception. --- .../src/org/anjocaido/groupmanager/GMConfiguration.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager') diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java index 34b50825a..fcc018d17 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GMConfiguration.java @@ -25,7 +25,7 @@ public class GMConfiguration { private boolean toggleValidate; private Integer saveInterval; private Integer backupDuration; - private String loggerLevel; + private String loggerLevel = "OFF"; private Map mirrorsMap; @@ -82,7 +82,9 @@ public class GMConfiguration { saveInterval = (Integer) save.get("minutes"); backupDuration = (Integer) save.get("hours"); - loggerLevel = ((Map) getElement("settings", GMconfig).get("logging")).get("level"); + Object level = ((Map) getElement("settings", GMconfig).get("logging")).get("level"); + if (level instanceof String) + level = (String) level; /* * Store our mirrors map for parsing later. -- cgit v1.2.3