X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Ftestingservices%2Fthreadpool%2FTestingFixedThreadPool.java;h=4f8de6dfe16f20467f5b8cbb56ff0d004be4a755;hp=25125fcd8287eb77928a258dd8c406a6c40d617b;hb=cbcc2b61265e903959f11d44c292771e76b3926e;hpb=61bad4207cc91cd14d8d38a255ad6549c20ff54e diff --git a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingFixedThreadPool.java b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingFixedThreadPool.java index 25125fcd82..4f8de6dfe1 100644 --- a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingFixedThreadPool.java +++ b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingFixedThreadPool.java @@ -10,6 +10,7 @@ package org.opendaylight.controller.config.manager.testingservices.threadpool; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; +import com.google.common.collect.Lists; import java.io.Closeable; import java.io.IOException; import java.util.Collections; @@ -19,8 +20,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; -import com.google.common.collect.Lists; - public class TestingFixedThreadPool implements TestingThreadPoolIfc, Closeable, TestingModifiableThreadPoolIfc { private final ThreadPoolExecutor executorService; @@ -37,7 +36,7 @@ public class TestingFixedThreadPool implements TestingThreadPoolIfc, Closeable, public static final List allExecutors = Collections .synchronizedList(Lists.newLinkedList()); - public TestingFixedThreadPool(int threadCount, String uniqueName) { + public TestingFixedThreadPool(final int threadCount, final String uniqueName) { checkNotNull(uniqueName); this.uniqueName = uniqueName; executorService = (ThreadPoolExecutor) Executors @@ -67,7 +66,7 @@ public class TestingFixedThreadPool implements TestingThreadPoolIfc, Closeable, } @Override - public void setMaximumNumberOfThreads(int activeCount) { + public void setMaximumNumberOfThreads(final int activeCount) { checkArgument(activeCount > 0); executorService.setMaximumPoolSize(activeCount); }