diff --git a/src/main/groovy/eu/m724/chatapi/example/ExampleSource.groovy b/src/main/groovy/eu/m724/chatapi/example/ExampleSource.groovy index 1804c76..104ec68 100644 --- a/src/main/groovy/eu/m724/chatapi/example/ExampleSource.groovy +++ b/src/main/groovy/eu/m724/chatapi/example/ExampleSource.groovy @@ -40,7 +40,7 @@ class ExampleSource implements ChatSource { String response = rollResponse(chat) String[] parts = response.split(" ") - ChatMessage message = new ChatMessage(true); + ChatMessage message = new ChatMessage(true) CompletableFuture.supplyAsync { for (int i=0; i type of consumer (usually {@link eu.m724.chatapi.chat.ChatEvent} + */ +@Deprecated public class BlockingQueueConsumer { public final LinkedBlockingQueue queue = new LinkedBlockingQueue<>(); - public final Consumer consumer = new Consumer<>() { - @Override - public void accept(T t) { - try { - queue.put(t); - } catch (InterruptedException e) { - // again I don't know how that is relevant - throw new RuntimeException(e); - } + public final Consumer consumer = t -> { + try { + queue.put(t); + } catch (InterruptedException e) { + // again I don't know how that is relevant + throw new RuntimeException(e); } }; }