From 690af050e10ea727b3b6fceb49a5d55955ac3c04 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Thu, 6 Aug 2015 14:33:15 +0200 Subject: [PATCH] Style fix, removed useless cases --- .../Acrobot/Breeze/Configuration/Configuration.java | 4 +++- .../Listeners/PreShopCreation/ErrorMessageSender.java | 6 +----- .../Listeners/PreTransaction/ErrorMessageSender.java | 10 +--------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/Acrobot/Breeze/Configuration/Configuration.java b/src/main/java/com/Acrobot/Breeze/Configuration/Configuration.java index f9e510b..249fc2c 100644 --- a/src/main/java/com/Acrobot/Breeze/Configuration/Configuration.java +++ b/src/main/java/com/Acrobot/Breeze/Configuration/Configuration.java @@ -79,8 +79,10 @@ public class Configuration { lastLine = scanner.nextLine(); } - if (scanner != null) + if (scanner != null) { scanner.close(); + } + return lastLine.isEmpty(); } catch (FileNotFoundException e) { e.printStackTrace(); diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ErrorMessageSender.java b/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ErrorMessageSender.java index 02879ac..7815acc 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ErrorMessageSender.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/PreShopCreation/ErrorMessageSender.java @@ -47,12 +47,8 @@ public class ErrorMessageSender implements Listener { case NOT_ENOUGH_MONEY: message = Messages.NOT_ENOUGH_MONEY; break; - case OTHER: + default: break; - case SHOP_CREATED_SUCCESSFULLY: - break; - default: - break; } if (message != null) { diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java b/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java index a6f9f45..9edd8c9 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/PreTransaction/ErrorMessageSender.java @@ -73,16 +73,8 @@ public class ErrorMessageSender implements Listener { case INVALID_SHOP: message = Messages.INVALID_SHOP_DETECTED; break; - case CREATIVE_MODE_PROTECTION: + default: break; - case OTHER: - break; - case SPAM_CLICKING_PROTECTION: - break; - case TRANSACTION_SUCCESFUL: - break; - default: - break; } if (message != null) {