Fix checkstyle issues to enforce it
[controller.git] / opendaylight / config / config-manager / src / test / java / org / opendaylight / controller / config / manager / testingservices / scheduledthreadpool / TestingScheduledThreadPoolImpl.java
index fb97b64faf769bc360c8e2a582e61b914675380d..459e45838402e601048f688be35a961f011e21bc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -7,38 +7,32 @@
  */
 package org.opendaylight.controller.config.manager.testingservices.scheduledthreadpool;
 
+import com.google.common.collect.Lists;
 import java.io.Closeable;
 import java.util.List;
 import java.util.concurrent.Executor;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
-
 import org.opendaylight.controller.config.api.runtime.HierarchicalRuntimeBeanRegistration;
 import org.opendaylight.controller.config.api.runtime.RootRuntimeBeanRegistrator;
-import org.opendaylight.controller.config.manager.testingservices.scheduledthreadpool.runtimebeans
-        .TestingScheduledRuntimeBean;
+import org.opendaylight.controller.config.manager.testingservices.scheduledthreadpool.runtimebeans.TestingScheduledRuntimeBean;
 import org.opendaylight.controller.config.manager.testingservices.threadpool.TestingThreadPoolIfc;
 
-import com.google.common.collect.Lists;
-
-public class TestingScheduledThreadPoolImpl implements TestingThreadPoolIfc,
-        TestingScheduledThreadPoolIfc, Closeable {
+public class TestingScheduledThreadPoolImpl implements TestingThreadPoolIfc, TestingScheduledThreadPoolIfc, Closeable {
     private static volatile int numberOfCloseMethodCalls = 0;
     private final ScheduledThreadPoolExecutor executor;
     private final RootRuntimeBeanRegistrator runtimeBeanRegistrator;
 
-    public static final List<ScheduledThreadPoolExecutor> allExecutors = Lists
-            .newLinkedList();
+    public static final List<ScheduledThreadPoolExecutor> ALLEXECUTORS = Lists.newLinkedList();
 
-    public TestingScheduledThreadPoolImpl(
-            RootRuntimeBeanRegistrator runtimeBeanRegistrator, int corePoolSize) {
+    public TestingScheduledThreadPoolImpl(final RootRuntimeBeanRegistrator runtimeBeanRegistrator,
+            final int corePoolSize) {
         this.runtimeBeanRegistrator = runtimeBeanRegistrator;
         executor = new ScheduledThreadPoolExecutor(corePoolSize);
-        allExecutors.add(executor);
+        ALLEXECUTORS.add(executor);
         HierarchicalRuntimeBeanRegistration hierarchicalRuntimeBeanRegistration = runtimeBeanRegistrator
                 .registerRoot(new TestingScheduledRuntimeBean());
-        hierarchicalRuntimeBeanRegistration.register("a", "b",
-                new TestingScheduledRuntimeBean());
+        hierarchicalRuntimeBeanRegistration.register("a", "b", new TestingScheduledRuntimeBean());
     }
 
     @Override
@@ -64,15 +58,14 @@ public class TestingScheduledThreadPoolImpl implements TestingThreadPoolIfc,
     }
 
     public static void cleanUp() {
-        for (ScheduledThreadPoolExecutor executor : allExecutors) {
+        for (ScheduledThreadPoolExecutor executor : ALLEXECUTORS) {
             executor.shutdown();
         }
-        allExecutors.clear();
+        ALLEXECUTORS.clear();
         numberOfCloseMethodCalls = 0;
     }
 
     public static int getNumberOfCloseMethodCalls() {
         return numberOfCloseMethodCalls;
     }
-
 }