OPNFLWPLUG-1071 : Removal of javax.annotation.Nonnnull and replacement of javax.annot...
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / StatisticsPollingService.java
index fa035ca53915cd29d8a0ef786aea89a1aba22db3..49c64bd144d45b1820e5ff5316167e1059397bcf 100644 (file)
@@ -18,8 +18,7 @@ import java.util.concurrent.CancellationException;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Supplier;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.openflowplugin.api.ConnectionException;
 
 public class StatisticsPollingService extends AbstractScheduledService {
@@ -31,10 +30,10 @@ public class StatisticsPollingService extends AbstractScheduledService {
     private final Supplier<ListenableFuture<Boolean>> gatheringSupplier;
     private final SettableFuture<Void> future = SettableFuture.create();
 
-    StatisticsPollingService(@Nonnull final TimeCounter counter,
+    StatisticsPollingService(@NonNull final TimeCounter counter,
                              final long pollingInterval,
                              final long maximumTimerDelay,
-                             @Nonnull final Supplier<ListenableFuture<Boolean>> gatheringSupplier) {
+                             @NonNull final Supplier<ListenableFuture<Boolean>> gatheringSupplier) {
         this.counter = counter;
         this.pollingInterval = pollingInterval;
         this.maximumTimerDelay = maximumTimerDelay;
@@ -48,7 +47,7 @@ public class StatisticsPollingService extends AbstractScheduledService {
     }
 
     @Override
-    protected void startUp() throws Exception {
+    protected void startUp() {
         counter.markStart();
     }
 
@@ -60,12 +59,12 @@ public class StatisticsPollingService extends AbstractScheduledService {
 
         Futures.addCallback(gatheringSupplier.get(), new FutureCallback<Boolean>() {
             @Override
-            public void onSuccess(@Nullable final Boolean result) {
+            public void onSuccess(final Boolean result) {
                 waitFuture.complete(result);
             }
 
             @Override
-            public void onFailure(@Nonnull final Throwable throwable) {
+            public void onFailure(final Throwable throwable) {
                 waitFuture.completeExceptionally(throwable);
             }
         }, MoreExecutors.directExecutor());
@@ -110,4 +109,4 @@ public class StatisticsPollingService extends AbstractScheduledService {
             }
         }
     }
-}
\ No newline at end of file
+}