Fix FlexibleThreadPoolWrapper checkstyle 19/107619/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 30 Aug 2023 14:50:22 +0000 (16:50 +0200)
committerRobert Varga <nite@hq.sk>
Sun, 17 Sep 2023 12:39:45 +0000 (12:39 +0000)
Nested static classes are detected as checkstyle violations if they are
not final. Fix that.

Change-Id: Ifa5878890cabe845ecf8d98d46f2fc8015a78770
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 771bcd1a76b7f40f2338c047eced3e34794c33a1)

opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java

index 9949e36d3714f55b6936e66d3d596ef9a5b9b96c..cfa9597f8d3b4fd02f13f2f90fed7996dd984260 100644 (file)
@@ -103,7 +103,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable {
     /**
      * if the max threads are met, then it will raise a rejectedExecution. We then push to the queue.
      */
-    private static class FlexibleRejectionHandler implements RejectedExecutionHandler {
+    private static final class FlexibleRejectionHandler implements RejectedExecutionHandler {
         @Override
         @SuppressWarnings("checkstyle:parameterName")
         public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) {
@@ -115,7 +115,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable {
         }
     }
 
-    private static class ForwardingBlockingQueue
+    private static final class ForwardingBlockingQueue
             extends com.google.common.util.concurrent.ForwardingBlockingQueue<Runnable> {
         private final BlockingQueue<Runnable> delegate;