Turn member field into local variable
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 11 Jul 2015 18:53:34 +0000 (20:53 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 11 Jul 2015 18:53:34 +0000 (20:53 +0200)
src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java

index 4601acd..0151f2d 100644 (file)
@@ -53,12 +53,12 @@ public class DefaultFcpClientTest {
                "SSK@wtbgd2loNcJCXvtQVOftl2tuWBomDQHfqS6ytpPRhfw,7SHH53gletBVb9JD7nBsyClbLQsBubDPEIcwg908r7Y,AQACAAE/";
 
        private static int threadCounter = 0;
-       private final ExecutorService threadPool =
-               Executors.newCachedThreadPool(r -> new Thread(r, "Test-Thread-" + threadCounter++));
        private final FakeTcpServer fcpServer;
        private final DefaultFcpClient fcpClient;
 
        public DefaultFcpClientTest() throws IOException {
+               ExecutorService threadPool =
+                       Executors.newCachedThreadPool(r -> new Thread(r, "Test-Thread-" + threadCounter++));
                fcpServer = new FakeTcpServer(threadPool);
                fcpClient = new DefaultFcpClient(threadPool, "localhost", fcpServer.getPort(), () -> "Test");
        }