From: David ‘Bombe’ Roden Date: Wed, 1 Jul 2015 19:27:16 +0000 (+0200) Subject: Add close() method, implement AutoCloseable X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8edbf10b2a4cbc3e43853c9c042a1f40500c94be;p=jFCPlib.git Add close() method, implement AutoCloseable --- diff --git a/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java b/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java index 07afb24..6b3674a 100644 --- a/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java +++ b/src/test/java/net/pterodactylus/fcp/fake/FakeTcpServer.java @@ -15,7 +15,7 @@ import org.hamcrest.Matcher; * * @author David ‘Bombe’ Roden */ -public class FakeTcpServer { +public class FakeTcpServer implements AutoCloseable { private final ServerSocket serverSocket; private final ExecutorService executorService; @@ -52,4 +52,9 @@ public class FakeTcpServer { return clientSocket.get().readLine(); } + @Override + public void close() throws IOException { + clientSocket.get().close(); + } + }