Use lambda instead of anonymous inner class
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 5 Jul 2015 20:08:10 +0000 (22:08 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sun, 5 Jul 2015 20:08:10 +0000 (22:08 +0200)
src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java

index e988ff3..67a1fdc 100644 (file)
@@ -31,12 +31,9 @@ public class FakeTcpServer implements AutoCloseable {
        }
 
        public Future<?> connect() throws IOException {
-               return executorService.submit(new Callable<Void>() {
-                       @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;
                });
        }