From: David ‘Bombe’ Roden Date: Sun, 5 Jul 2015 20:08:10 +0000 (+0200) Subject: Use lambda instead of anonymous inner class X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=99906ba752865d4ed0dd06e08a5cbe81d325ef34;p=jFCPlib.git Use lambda instead of anonymous inner class --- diff --git a/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java b/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java index e988ff3..67a1fdc 100644 --- a/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java +++ b/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java @@ -31,12 +31,9 @@ public class FakeTcpServer implements AutoCloseable { } public Future connect() throws IOException { - return executorService.submit(new Callable() { - @Override - public Void call() throws Exception { - clientSocket.set(new TextSocket(serverSocket.accept())); - return null; - } + return executorService.submit(() -> { + clientSocket.set(new TextSocket(serverSocket.accept())); + return null; }); }