Remove unused exceptions
[controller.git] / opendaylight / config / threadpool-config-impl / src / main / java / org / opendaylight / controller / config / threadpool / util / FlexibleThreadPoolWrapper.java
index 5036399828a539e5ec5deb451881f3e4e9218b68..b89657a3bd13a895bd929c61c766211b211c7407 100644 (file)
@@ -8,8 +8,8 @@
 
 package org.opendaylight.controller.config.threadpool.util;
 
+import com.google.common.base.Optional;
 import java.io.Closeable;
-import java.io.IOException;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -19,11 +19,8 @@ import java.util.concurrent.RejectedExecutionHandler;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-
 import org.opendaylight.controller.config.threadpool.ThreadPool;
 
-import com.google.common.base.Optional;
-
 /**
  * Implementation of {@link ThreadPool} using flexible number of threads wraps
  * {@link ExecutorService}.
@@ -56,7 +53,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable {
      * This impl saturates threadpool first, then queue. When both are full caller will get blocked.
      */
     private static ForwardingBlockingQueue getQueue(Optional<Integer> capacity) {
-        final BlockingQueue<Runnable> delegate = capacity.isPresent() ? new LinkedBlockingQueue<Runnable>(capacity.get()) : new LinkedBlockingQueue<Runnable>();
+        final BlockingQueue<Runnable> delegate = capacity.isPresent() ? new LinkedBlockingQueue<>(capacity.get()) : new LinkedBlockingQueue<>();
         return new ForwardingBlockingQueue(delegate);
     }
 
@@ -99,7 +96,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable {
     }
 
     @Override
-    public void close() throws IOException {
+    public void close() {
         executor.shutdown();
     }