From 99906ba752865d4ed0dd06e08a5cbe81d325ef34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 5 Jul 2015 22:08:10 +0200 Subject: [PATCH] Use lambda instead of anonymous inner class --- src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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; }); } -- 2.7.4