Using nonNull API's in ELAN
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / listeners / HwvtepPhysicalSwitchListener.java
index 8e0baa8d98efe2d5c4eae1e457cc86238408651d..6ea9274691a12409d41c5e8b99073d1209333970 100644 (file)
@@ -82,7 +82,7 @@ public class HwvtepPhysicalSwitchListener
                         globalIid.firstKeyOf(Node.class).getNodeId().getValue());
 
     private static final Predicate<PhysicalSwitchAugmentation> TUNNEL_IP_AVAILABLE =
-        phySwitch -> !HwvtepHAUtil.isEmpty(phySwitch.getTunnelIps().values());
+        phySwitch -> !HwvtepHAUtil.isEmpty(phySwitch.nonnullTunnelIps().values());
 
     private static final Predicate<PhysicalSwitchAugmentation> TUNNEL_IP_NOT_AVAILABLE = TUNNEL_IP_AVAILABLE.negate();
 
@@ -319,7 +319,7 @@ public class HwvtepPhysicalSwitchListener
             l2GwDevice.setConnected(true);
             l2GwDevice.setHwvtepNodeId(globalNodeId);
 
-            Map<TunnelIpsKey, TunnelIps> tunnelIps = phySwitchAdded.getTunnelIps();
+            Map<TunnelIpsKey, TunnelIps> tunnelIps = phySwitchAdded.nonnullTunnelIps();
             if (tunnelIps != null) {
                 for (TunnelIps tunnelIp : tunnelIps.values()) {
                     IpAddress tunnelIpAddr = tunnelIp.getTunnelIpsKey();