Remove unused exceptions
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / client / http / perf / AsyncExecutionStrategy.java
index 180dad7d120fd42bbc8bc8777f1305a4530ae467..ecbb6de768f0b2dfe9ceff8b358231219e846ff9 100644 (file)
@@ -11,7 +11,6 @@ package org.opendaylight.netconf.test.tool.client.http.perf;
 import com.ning.http.client.AsyncCompletionHandler;
 import com.ning.http.client.AsyncHttpClient;
 import com.ning.http.client.HttpResponseStatus;
-import com.ning.http.client.ListenableFuture;
 import com.ning.http.client.Request;
 import com.ning.http.client.Response;
 import java.util.ArrayList;
@@ -39,7 +38,6 @@ public class AsyncExecutionStrategy implements ExecutionStrategy {
 
     @Override
     public void invoke() {
-        final ArrayList<ListenableFuture<Response>> futures = new ArrayList<>();
         LOG.info("Begin sending async requests");
 
         for (final Request request : payloads) {
@@ -48,7 +46,7 @@ public class AsyncExecutionStrategy implements ExecutionStrategy {
             } catch (InterruptedException e) {
                 LOG.warn("Semaphore acquire interrupted");
             }
-            futures.add(asyncHttpClient.executeRequest(request, new AsyncCompletionHandler<Response>() {
+            asyncHttpClient.executeRequest(request, new AsyncCompletionHandler<Response>() {
                 @Override
                 public STATE onStatusReceived(HttpResponseStatus status) throws Exception {
                     super.onStatusReceived(status);
@@ -60,11 +58,11 @@ public class AsyncExecutionStrategy implements ExecutionStrategy {
                 }
 
                 @Override
-                public Response onCompleted(Response response) throws Exception {
+                public Response onCompleted(Response response) {
                     semaphore.release();
                     return response;
                 }
-            }));
+            });
         }
         LOG.info("Requests sent, waiting for responses");