NETVIRT-1630 migrate to md-sal APIs
[netvirt.git] / natservice / impl / src / main / java / org / opendaylight / netvirt / natservice / internal / NatArpNotificationHandler.java
index 833db729280d22f3010ee9e31d027319e76a15c0..0f127a7d2432ff3e9ff26096bc0c5c8c8e266230 100644 (file)
@@ -11,8 +11,8 @@ import java.util.List;
 import java.util.Objects;
 import javax.inject.Inject;
 import javax.inject.Singleton;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.common.api.ReadFailedException;
 import org.opendaylight.netvirt.elanmanager.api.IElanService;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.ArpRequestReceived;
@@ -102,14 +102,15 @@ public class NatArpNotificationHandler implements OdlArputilListener {
             notification.getDpnId(), targetIfc.getName());
         VipState cachedState = null;
         try {
-            cachedState = this.vipStateTracker.get(newVipState.getIp()).orNull();
+            cachedState = this.vipStateTracker.get(newVipState.getIp()).orElse(null);
         } catch (ReadFailedException e) {
             LOG.warn("NatArpNotificationHandler failed to read vip state {}", notification, e);
         }
 
         if (null == cachedState) {
             this.southboundEventHandlers.handleAdd(
-                                    targetIfc.getName(), notification.getDpnId(), routerInterface, newVipState);
+                                    targetIfc.getName(), notification.getDpnId(),
+                                    routerInterface, newVipState);
         } else if (!cachedState.getDpnId().equals(newVipState.getDpnId())) {
             this.southboundEventHandlers.handleRemove(cachedState.getIfcName(),
                     cachedState.getDpnId(), routerInterface);