From b4559b3d699e236b7f2c8bfb3c077f976190bc3b Mon Sep 17 00:00:00 2001 From: BtoBastian Date: Tue, 16 Jan 2018 12:03:35 +0100 Subject: [PATCH] Replaced an anonymous class with a lambda expression --- .../java/de/btobastian/sdcf4j/handler/JavacordHandler.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sdcf4j-javacord/src/main/java/de/btobastian/sdcf4j/handler/JavacordHandler.java b/sdcf4j-javacord/src/main/java/de/btobastian/sdcf4j/handler/JavacordHandler.java index eefa027..f8dd3ce 100644 --- a/sdcf4j-javacord/src/main/java/de/btobastian/sdcf4j/handler/JavacordHandler.java +++ b/sdcf4j-javacord/src/main/java/de/btobastian/sdcf4j/handler/JavacordHandler.java @@ -118,12 +118,7 @@ private void handleMessageCreate(DiscordApi api, final Message message) { final Object[] parameters = getParameters(splitMessage, command, message, api); if (commandAnnotation.async()) { final SimpleCommand commandFinal = command; - api.getThreadPool().getExecutorService().submit(new Runnable() { - @Override - public void run() { - invokeMethod(commandFinal, message, parameters); - } - }); + api.getThreadPool().getExecutorService().submit(() -> invokeMethod(commandFinal, message, parameters)); } else { invokeMethod(command, message, parameters); }