Use explicit classes for Listener forwarding
[controller.git] / benchmark / ntfbenchmark / src / main / java / ntfbenchmark / impl / NtfbenchNonblockingProducer.java
index f4db3693c4f8499263bf31e59eda26c49ddbfe0e..485eb158074c53702ea876416b8b224b75698f06 100644 (file)
@@ -8,7 +8,6 @@
 
 package ntfbenchmark.impl;
 
-import com.google.common.base.Throwables;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.concurrent.ExecutionException;
@@ -26,13 +25,14 @@ public class NtfbenchNonblockingProducer extends AbstractNtfbenchProducer {
 
 
     @Override
+    @SuppressWarnings("checkstyle:illegalCatch")
     public void run() {
         int ntfOk = 0;
         int ntfError = 0;
-        ListenableFuture<? extends Object> lastOkFuture = null;
+        ListenableFuture<?> lastOkFuture = null;
         for (int i = 0; i < this.iterations; i++) {
             try {
-                final ListenableFuture<? extends Object> result = this.publishService.offerNotification(this.ntf);
+                final ListenableFuture<?> result = this.publishService.offerNotification(this.ntf);
                 if (NotificationPublishService.REJECTED == result) {
                     ntfError++;
                 } else {
@@ -51,7 +51,7 @@ public class NtfbenchNonblockingProducer extends AbstractNtfbenchProducer {
             try {
                 lastOkFuture.get();
             } catch (InterruptedException | ExecutionException e) {
-                throw Throwables.propagate(e);
+                throw new RuntimeException(e);
             }
         }
     }