Enable checkstyle for neutronvpn
[netvirt.git] / vpnservice / neutronvpn / neutronvpn-impl / src / main / java / org / opendaylight / netvirt / neutronvpn / NeutronSubnetGwMacResolver.java
index 72e1767e7d40591c4c12cba1e35fc00392f450db..544cec7d682797594bed42416cd89bce0e012205 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.netvirt.neutronvpn;
 
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import java.math.BigInteger;
 import java.util.Collections;
 import java.util.List;
@@ -16,7 +17,6 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
-
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.netvirt.elanmanager.api.IElanService;
 import org.opendaylight.netvirt.vpnmanager.api.ICentralizedSwitchProvider;
@@ -38,8 +38,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.subnets.rev150712.s
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
-
 public class NeutronSubnetGwMacResolver {
     private static final Logger LOG = LoggerFactory.getLogger(NeutronSubnetGwMacResolver.class);
     private static final long L3_INSTALL_DELAY_MILLIS = 5000;
@@ -64,6 +62,8 @@ public class NeutronSubnetGwMacResolver {
         this.cswitchProvider = cswitchProvider;
     }
 
+    // TODO Clean up the exception handling
+    @SuppressWarnings("checkstyle:IllegalCatch")
     public void start() {
         LOG.info("{} start", getClass().getSimpleName());
 
@@ -100,6 +100,13 @@ public class NeutronSubnetGwMacResolver {
         }, L3_INSTALL_DELAY_MILLIS, TimeUnit.MILLISECONDS);
     }
 
+    private void sendArpRequestsToExtGateways() {
+        LOG.trace("Sending ARP requests to exteral gateways");
+        for (Router router : NeutronvpnUtils.routerMap.values()) {
+            sendArpRequestsToExtGateways(router);
+        }
+    }
+
     private void sendArpRequestsToExtGatewayTask(Router router) {
         LOG.trace("Send ARP requests to external GW for router {}", router);
         Port extPort = getRouterExtGatewayPort(router);
@@ -137,13 +144,8 @@ public class NeutronSubnetGwMacResolver {
 
     }
 
-    private void sendArpRequestsToExtGateways() {
-        LOG.trace("Sending ARP requests to exteral gateways");
-        for (Router router : NeutronvpnUtils.routerMap.values()) {
-            sendArpRequestsToExtGateways(router);
-        }
-    }
-
+    // TODO Clean up the exception handling
+    @SuppressWarnings("checkstyle:IllegalCatch")
     private void sendArpRequest(IpAddress srcIpAddress, IpAddress dstIpAddress, MacAddress srcMacAddress,
             String interfaceName) {
         if (srcIpAddress == null || dstIpAddress == null) {