Using nonNull API's in ELAN
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / ha / handlers / NodeConnectedHandler.java
index 3d94427aabe80b56c092989c46fec50d572b3d1d..6684285b654a591b253799fdbd3c32751975400c 100644 (file)
@@ -117,7 +117,7 @@ public class NodeConnectedHandler {
         LOG.info("HA ps node not present cleanup child {}" , childNode);
         HwvtepGlobalAugmentation augmentation = childNode.augmentation(HwvtepGlobalAugmentation.class);
         if (augmentation != null) {
-            Map<SwitchesKey, Switches> switches = augmentation.getSwitches();
+            Map<SwitchesKey, Switches> switches = augmentation.nonnullSwitches();
             if (switches != null) {
                 for (Switches ps : switches.values()) {
                     HwvtepHAUtil.deleteNodeIfPresent(tx, ps.getSwitchRef().getValue());
@@ -144,7 +144,7 @@ public class NodeConnectedHandler {
             return;
         }
         Map<SwitchesKey, Switches> keySwitchesMap
-                = childGlobalNode.augmentation(HwvtepGlobalAugmentation.class).getSwitches();
+                = childGlobalNode.augmentation(HwvtepGlobalAugmentation.class).nonnullSwitches();
         if (keySwitchesMap == null) {
             return;
         }