Organize Imports to be Checkstyle compliant in utils
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / ExecutorServiceUtil.java
index 51a8d16f84ce007c3499b8f9e04e78766c310c6e..429bb0bd0c0e66ce33b49f6f619bdbb1e004c4ee 100644 (file)
@@ -7,18 +7,16 @@
  */
 package org.opendaylight.yangtools.util;
 
+import com.google.common.util.concurrent.ForwardingBlockingQueue;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.RejectedExecutionHandler;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.util.concurrent.ForwardingBlockingQueue;
-
 /**
  * Utility methods for dealing with {@link ExecutorService}s.
  */
@@ -26,7 +24,7 @@ public final class ExecutorServiceUtil {
     private static final class WaitInQueueExecutionHandler implements RejectedExecutionHandler {
         @Override
         public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) {
-            ifexecutor.isShutdown() ) {
+            if (executor.isShutdown() ) {
                 throw new RejectedExecutionException( "Executor has been shutdown." );
             }
 
@@ -90,7 +88,7 @@ public final class ExecutorServiceUtil {
         executor.shutdown();
 
         try {
-            if(!executor.awaitTermination(timeout, unit)) {
+            if (!executor.awaitTermination(timeout, unit)) {
                 executor.shutdownNow();
             }
         } catch( InterruptedException e ) {