natservice-impl: propagate upstream non-null annotations 30/60030/3
authorStephen Kitt <skitt@redhat.com>
Thu, 6 Jul 2017 15:04:35 +0000 (17:04 +0200)
committerSam Hague <shague@redhat.com>
Mon, 17 Jul 2017 18:28:54 +0000 (18:28 +0000)
Change-Id: I458244f842dd1266ae8560032151f6f8224b79ba
Signed-off-by: Stephen Kitt <skitt@redhat.com>
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/EvpnDnatFlowProgrammer.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/ExternalRoutersListener.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NAPTSwitchSelector.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NaptEventHandler.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/NatTunnelInterfaceStateListener.java
vpnservice/natservice/natservice-impl/src/main/java/org/opendaylight/netvirt/natservice/internal/VpnFloatingIpHandler.java

index 9b2e092bb4d052283a33b050f8eb7bcb8babb828..2b73ab8d80df401540d8093ddbde7c8a5edac6c6 100644 (file)
@@ -19,6 +19,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.Future;
 
+import javax.annotation.Nonnull;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -159,7 +160,7 @@ public class EvpnDnatFlowProgrammer {
         Futures.addCallback(futureVxlan, new FutureCallback<RpcResult<Void>>() {
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(@Nonnull Throwable error) {
                 LOG.error("NAT Service : Error {} in custom fib routes install process for Floating "
                         + "IP Prefix {} on DPN {}", error, externalIp, dpnId);
             }
@@ -268,7 +269,7 @@ public class EvpnDnatFlowProgrammer {
         Futures.addCallback(futureVxlan, new FutureCallback<RpcResult<Void>>() {
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(@Nonnull Throwable error) {
                 LOG.error("NAT Service : Error {} in custom fib routes remove process for Floating "
                         + "IP Prefix {} on DPN {}", error, externalIp, dpnId);
             }
index e996b83e35f5460c3a7cf71431ccdb849cb2656d..fd22fc2308cd2791aeaf5a4f8a5781c5d9785a2a 100644 (file)
@@ -1062,7 +1062,7 @@ public class ExternalRoutersListener extends AsyncDataTreeChangeListenerBase<Rou
         Futures.addCallback(future, new FutureCallback<RpcResult<Void>>() {
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(@Nonnull Throwable error) {
                 log.error("NAT Service : Error in generate label or fib install process", error);
             }
 
@@ -2129,7 +2129,7 @@ public class ExternalRoutersListener extends AsyncDataTreeChangeListenerBase<Rou
         Futures.addCallback(labelFuture, new FutureCallback<RpcResult<Void>>() {
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(@Nonnull Throwable error) {
                 LOG.error("NAT Service : Error in removing the label or custom fib entries", error);
             }
 
@@ -2222,7 +2222,7 @@ public class ExternalRoutersListener extends AsyncDataTreeChangeListenerBase<Rou
         Futures.addCallback(labelFuture, new FutureCallback<RpcResult<Void>>() {
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(@Nonnull Throwable error) {
                 LOG.error("NAT Service : Error in removing the label or custom fib entries", error);
             }
 
index 30f3adf1c269e043b03ce418e2b4e3a08fa7b9f7..21a5aece82722734221c6e51d8e0fd2e2e888897 100644 (file)
@@ -15,6 +15,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
+import javax.annotation.Nonnull;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -195,7 +196,7 @@ public class NAPTSwitchSelector {
         }
 
         @Override
-        public int compareTo(SwitchWeight switchWeight) {
+        public int compareTo(@Nonnull SwitchWeight switchWeight) {
             return switchWeight.getWeight() - weight;
         }
     }
index 5b15a8f40d1da2bc59454c6ed1f1657c5f077a7d..2adb25cb88b0cced41aecc67fe6cfa460d3419e2 100644 (file)
@@ -18,6 +18,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
+import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.inject.Inject;
 import javax.inject.Singleton;
@@ -265,7 +266,7 @@ public class NaptEventHandler {
                                             }
 
                                             @Override
-                                            public void onFailure(Throwable throwable) {
+                                            public void onFailure(@Nonnull Throwable throwable) {
                                                 LOG.error("handleEvent : Error configuring outbound "
                                                         + "SNAT flows using RPC for SNAT connection from {} to {}",
                                                                   internalAddress, externalAddress);
@@ -274,7 +275,7 @@ public class NaptEventHandler {
                                 }
 
                                 @Override
-                                public void onFailure(Throwable throwable) {
+                                public void onFailure(@Nonnull Throwable throwable) {
                                     LOG.error("handleEvent : Error configuring inbound SNAT flows "
                                             + "using RPC for SNAT connection from {} to {}",
                                             internalAddress, externalAddress);
index 9c18803bd4d5bd2a959bf3f1895b298753193071..f299bd1c2f20764456d7e5377eb2f0e90bc692bc 100644 (file)
@@ -21,6 +21,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Future;
+import javax.annotation.Nonnull;
 import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 import javax.inject.Singleton;
@@ -726,7 +727,7 @@ public class NatTunnelInterfaceStateListener
                 Futures.addCallback(listenableFuture, new FutureCallback<RpcResult<Void>>() {
 
                     @Override
-                    public void onFailure(Throwable error) {
+                    public void onFailure(@Nonnull Throwable error) {
                         LOG.error("NAT Service : SNAT -> Error in generate label or fib install process", error);
                     }
 
@@ -865,7 +866,7 @@ public class NatTunnelInterfaceStateListener
                 Futures.addCallback(listenableFuture, new FutureCallback<RpcResult<Void>>() {
 
                     @Override
-                    public void onFailure(Throwable error) {
+                    public void onFailure(@Nonnull Throwable error) {
                         LOG.error("NAT Service : DNAT -> Error in generate label or fib install process", error);
                     }
 
@@ -1080,7 +1081,7 @@ public class NatTunnelInterfaceStateListener
                 Futures.addCallback(listenableFuture, new FutureCallback<RpcResult<Void>>() {
 
                     @Override
-                    public void onFailure(Throwable error) {
+                    public void onFailure(@Nonnull Throwable error) {
                         LOG.error("NAT Service : DNAT -> Error in removing the table 21 entry pushing "
                             + "the MPLS label to the tunnel since label is invalid ", error);
                     }
index 962665d234d20dd7890da2a364041b65bae1d949..535b3de60d5890a070207aaf180c94f29b0193b6 100644 (file)
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.Future;
+import javax.annotation.Nonnull;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -225,7 +226,7 @@ public class VpnFloatingIpHandler implements FloatingIPHandler {
         Futures.addCallback(future, new FutureCallback<RpcResult<Void>>() {
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(@Nonnull Throwable error) {
                 LOG.error("Error in generate label or fib install process", error);
             }
 
@@ -336,7 +337,7 @@ public class VpnFloatingIpHandler implements FloatingIPHandler {
         Futures.addCallback(labelFuture, new FutureCallback<RpcResult<Void>>() {
 
             @Override
-            public void onFailure(Throwable error) {
+            public void onFailure(@Nonnull Throwable error) {
                 LOG.error("Error in removing the label or custom fib entries", error);
             }