Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Commit

Permalink
Replaced an anonymous class with a lambda expression
Browse files Browse the repository at this point in the history
  • Loading branch information
BtoBastian committed Jan 16, 2018
1 parent 80e63ca commit b4559b3
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b4559b3

Please sign in to comment.