diff --git a/src/main/java/fr/xephi/authme/command/executable/authme/PurgeCommand.java b/src/main/java/fr/xephi/authme/command/executable/authme/PurgeCommand.java index a0811cfed..db91aad65 100644 --- a/src/main/java/fr/xephi/authme/command/executable/authme/PurgeCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/authme/PurgeCommand.java @@ -4,9 +4,7 @@ import fr.xephi.authme.AuthMe; import fr.xephi.authme.command.CommandService; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.hooks.PluginHooks; import fr.xephi.authme.task.PurgeTask; -import fr.xephi.authme.util.BukkitService; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -26,12 +24,6 @@ public class PurgeCommand implements ExecutableCommand { @Inject private DataSource dataSource; - @Inject - private PluginHooks pluginHooks; - - @Inject - private BukkitService bukkitService; - @Inject private AuthMe plugin; diff --git a/src/main/java/fr/xephi/authme/initialization/FieldInjection.java b/src/main/java/fr/xephi/authme/initialization/FieldInjection.java index b8112b876..096c5f528 100644 --- a/src/main/java/fr/xephi/authme/initialization/FieldInjection.java +++ b/src/main/java/fr/xephi/authme/initialization/FieldInjection.java @@ -114,6 +114,7 @@ class FieldInjection implements Injection { return null; } + @SuppressWarnings("unchecked") private static Constructor getDefaultConstructor(Class clazz) { try { Constructor defaultConstructor = clazz.getDeclaredConstructor(); diff --git a/src/test/java/fr/xephi/authme/initialization/samples/InvalidPostConstruct.java b/src/test/java/fr/xephi/authme/initialization/samples/InvalidPostConstruct.java index 80b6c83ec..e6d6e3a69 100644 --- a/src/test/java/fr/xephi/authme/initialization/samples/InvalidPostConstruct.java +++ b/src/test/java/fr/xephi/authme/initialization/samples/InvalidPostConstruct.java @@ -9,11 +9,6 @@ import javax.inject.Inject; public abstract class InvalidPostConstruct { public static final class WithParams { - @Inject - private AlphaService alphaService; - @Inject - private ProvidedClass providedClass; - WithParams() { } @PostConstruct @@ -41,9 +36,6 @@ public abstract class InvalidPostConstruct { } public static final class NotVoidReturnType { - @Inject - private ProvidedClass providedClass; - @PostConstruct public int returnsInt() { return 42; @@ -51,9 +43,6 @@ public abstract class InvalidPostConstruct { } public static final class MultiplePostConstructs { - @Inject - private ProvidedClass providedClass; - @PostConstruct public void postConstruct1() { // --