netty-threadgroup-config: final parameters 72/56972/2
authorStephen Kitt <skitt@redhat.com>
Fri, 12 May 2017 15:35:03 +0000 (17:35 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Mon, 15 May 2017 11:49:50 +0000 (11:49 +0000)
This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I9bdd7ff5c44d8625ef539007be6274145190a3c4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NettyThreadgroupModule.java
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NettyThreadgroupModuleFactory.java
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NioEventLoopGroupCloseable.java
opendaylight/config/netty-threadgroup-config/src/test/java/org/opendaylight/controller/config/yang/netty/threadgroup/NettyThreadgroupModuleTest.java

index 2ae5715..d81a9dc 100644 (file)
@@ -33,11 +33,11 @@ public final class NettyThreadgroupModule extends org.opendaylight.controller.co
 {
     private BundleContext bundleContext;
 
-    public NettyThreadgroupModule(org.opendaylight.controller.config.api.ModuleIdentifier name, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+    public NettyThreadgroupModule(final org.opendaylight.controller.config.api.ModuleIdentifier name, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(name, dependencyResolver);
     }
 
-    public NettyThreadgroupModule(org.opendaylight.controller.config.api.ModuleIdentifier name, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, NettyThreadgroupModule oldModule, java.lang.AutoCloseable oldInstance) {
+    public NettyThreadgroupModule(final org.opendaylight.controller.config.api.ModuleIdentifier name, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, final NettyThreadgroupModule oldModule, final java.lang.AutoCloseable oldInstance) {
         super(name, dependencyResolver, oldModule, oldInstance);
     }
 
@@ -59,7 +59,7 @@ public final class NettyThreadgroupModule extends org.opendaylight.controller.co
 
         return Reflection.newProxy(AutoCloseableEventLoopGroupInterface.class, new AbstractInvocationHandler() {
             @Override
-            protected Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable {
+            protected Object handleInvocation(final Object proxy, final Method method, final Object[] args) throws Throwable {
                 if (method.getName().equals("close")) {
                     tracker.close();
                     return null;
@@ -70,7 +70,7 @@ public final class NettyThreadgroupModule extends org.opendaylight.controller.co
         });
     }
 
-    public void setBundleContext(BundleContext bundleContext) {
+    public void setBundleContext(final BundleContext bundleContext) {
         this.bundleContext = bundleContext;
     }
 
index 89a5231..d0f4249 100644 (file)
@@ -26,16 +26,16 @@ import org.osgi.framework.BundleContext;
 @Deprecated
 public class NettyThreadgroupModuleFactory extends AbstractNettyThreadgroupModuleFactory {
     @Override
-    public NettyThreadgroupModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
-            NettyThreadgroupModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) {
+    public NettyThreadgroupModule instantiateModule(final String instanceName, final DependencyResolver dependencyResolver,
+            final NettyThreadgroupModule oldModule, final AutoCloseable oldInstance, final BundleContext bundleContext) {
         NettyThreadgroupModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, oldInstance, bundleContext);
         module.setBundleContext(bundleContext);
         return module;
     }
 
     @Override
-    public NettyThreadgroupModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
-            BundleContext bundleContext) {
+    public NettyThreadgroupModule instantiateModule(final String instanceName, final DependencyResolver dependencyResolver,
+            final BundleContext bundleContext) {
         NettyThreadgroupModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext);
         module.setBundleContext(bundleContext);
         return module;
index 372cf0e..8e8ee64 100644 (file)
@@ -11,7 +11,7 @@ import io.netty.channel.nio.NioEventLoopGroup;
 import java.util.concurrent.TimeUnit;
 
 public class NioEventLoopGroupCloseable extends NioEventLoopGroup implements AutoCloseable {
-    private NioEventLoopGroupCloseable(int threadCount) {
+    private NioEventLoopGroupCloseable(final int threadCount) {
         super(threadCount);
     }
 
@@ -24,7 +24,7 @@ public class NioEventLoopGroupCloseable extends NioEventLoopGroup implements Aut
         shutdownGracefully(0, 1, TimeUnit.SECONDS);
     }
 
-    public static NioEventLoopGroupCloseable newInstance(Integer threadCount) {
+    public static NioEventLoopGroupCloseable newInstance(final Integer threadCount) {
         if(threadCount == null || threadCount <= 0) {
             return new NioEventLoopGroupCloseable();
         }
index 81f8584..8d52a09 100644 (file)
@@ -99,7 +99,7 @@ public class NettyThreadgroupModuleTest extends AbstractConfigTest {
         assertStatus(status, 0, 1, 0);
     }
 
-    private ObjectName createInstance(ConfigTransactionJMXClient transaction, String instanceName, Integer threads)
+    private ObjectName createInstance(final ConfigTransactionJMXClient transaction, final String instanceName, final Integer threads)
             throws InstanceAlreadyExistsException {
         ObjectName nameCreated = transaction.createModule(factory.getImplementationName(), instanceName);
         NettyThreadgroupModuleMXBean mxBean = transaction.newMBeanProxy(nameCreated, NettyThreadgroupModuleMXBean.class);

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.