13
0
geforkt von Mirrors/Velocity

Remove redundant extra lambda in EventManager#fire implementation

Dieser Commit ist enthalten in:
Luck 2018-12-04 00:03:47 +00:00
Ursprung 3d3d6adf04
Commit 6ff9180987
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EFA9B3EC5FD90F8B

Datei anzeigen

@ -110,7 +110,8 @@ public class VelocityEventManager implements EventManager {
return CompletableFuture.completedFuture(event);
}
Runnable runEvent = () -> {
CompletableFuture<E> eventFuture = new CompletableFuture<>();
service.execute(() -> {
PostResult result = bus.post(event);
if (!result.exceptions().isEmpty()) {
logger.error("Some errors occurred whilst posting event {}.", event);
@ -119,11 +120,6 @@ public class VelocityEventManager implements EventManager {
logger.error("#{}: \n", ++i, exception);
}
}
};
CompletableFuture<E> eventFuture = new CompletableFuture<>();
service.execute(() -> {
runEvent.run();
eventFuture.complete(event);
});
return eventFuture;