From 38db2ef0bd96fad41b43e288f915e68381a65afc Mon Sep 17 00:00:00 2001 From: ljacqu Date: Wed, 1 Jun 2016 23:24:48 +0200 Subject: [PATCH] Minor code householding - Add removed property to migration service - Log exception with appropriate logger method --- src/main/java/fr/xephi/authme/ConsoleLogger.java | 4 ++-- src/main/java/fr/xephi/authme/command/CommandInitializer.java | 3 --- .../fr/xephi/authme/settings/SettingsMigrationService.java | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/xephi/authme/ConsoleLogger.java b/src/main/java/fr/xephi/authme/ConsoleLogger.java index 26a25704..284a7442 100644 --- a/src/main/java/fr/xephi/authme/ConsoleLogger.java +++ b/src/main/java/fr/xephi/authme/ConsoleLogger.java @@ -46,7 +46,7 @@ public final class ConsoleLogger { try { fileWriter = new FileWriter(logFile, true); } catch (IOException e) { - ConsoleLogger.showError("Failed to create the log file:" + e); + ConsoleLogger.logException("Failed to create the log file:", e); } } } else { @@ -70,7 +70,7 @@ public final class ConsoleLogger { public static void debug(String message) { if (enableDebug) { //creating and filling an exception is a expensive call - //->so it should be removed as soon #419 is fixed + //TODO #419 20160601: ->so it should be removed as soon #419 is fixed //logger.isLoggable does not work because the plugin logger is always ALL logger.log(Level.FINE, message + ' ' + Thread.currentThread().getName(), new Exception()); diff --git a/src/main/java/fr/xephi/authme/command/CommandInitializer.java b/src/main/java/fr/xephi/authme/command/CommandInitializer.java index 162d0289..59ab9c51 100644 --- a/src/main/java/fr/xephi/authme/command/CommandInitializer.java +++ b/src/main/java/fr/xephi/authme/command/CommandInitializer.java @@ -43,9 +43,6 @@ import java.util.Collection; import java.util.List; import java.util.Set; -import static fr.xephi.authme.permission.DefaultPermission.ALLOWED; -import static fr.xephi.authme.permission.DefaultPermission.OP_ONLY; - /** * Initializes all available AuthMe commands. */ diff --git a/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java b/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java index 7b024113..fdafea6f 100644 --- a/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java +++ b/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java @@ -64,7 +64,7 @@ public class SettingsMigrationService { String[] deprecatedProperties = { "Converter.Rakamak.newPasswordHash", "Hooks.chestshop", "Hooks.legacyChestshop", "Hooks.notifications", "Passpartu", "Performances", "settings.restrictions.enablePasswordVerifier", "Xenoforo.predefinedSalt", - "VeryGames"}; + "VeryGames", "settings.restrictions.allowAllCommandsIfRegistrationIsOptional"}; for (String deprecatedPath : deprecatedProperties) { if (configuration.contains(deprecatedPath)) { return true;