Fix deprecation warnings around addAugmentation()
[ovsdb.git] / hwvtepsouthbound / hwvtepsouthbound-impl / src / main / java / org / opendaylight / ovsdb / hwvtepsouthbound / transactions / md / HwvtepUcastMacsLocalUpdateCommand.java
index d36165a348a3f04bc28eb8f6fe8b5019b96784b6..0d73a3aa07a1778430088a8c8bf860b4c5d9ea13 100644 (file)
@@ -73,11 +73,9 @@ public class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransactionComman
         //Update node with UcastMacsLocal reference
         NodeBuilder connectionNode = new NodeBuilder();
         connectionNode.setNodeId(getOvsdbConnectionInstance().getNodeId());
-        HwvtepGlobalAugmentationBuilder hgAugmentationBuilder = new HwvtepGlobalAugmentationBuilder();
         List<LocalUcastMacs> umclList = new ArrayList<>();
         ucml.forEach(mac -> umclList.add(buildLocalUcastMac(mac)));
-        hgAugmentationBuilder.setLocalUcastMacs(umclList);
-        connectionNode.addAugmentation(HwvtepGlobalAugmentation.class, hgAugmentationBuilder.build());
+        connectionNode.addAugmentation(new HwvtepGlobalAugmentationBuilder().setLocalUcastMacs(umclList).build());
         return connectionNode.build();
     }
 
@@ -93,7 +91,7 @@ public class HwvtepUcastMacsLocalUpdateCommand extends AbstractTransactionComman
             UUID plocUUID = ucml.getLocatorColumn().getData();
             PhysicalLocator physicalLocator = updatedPLocRows.get(plocUUID);
             if (physicalLocator == null) {
-                physicalLocator = (PhysicalLocator) getOvsdbConnectionInstance()
+                physicalLocator = getOvsdbConnectionInstance()
                         .getDeviceInfo().getPhysicalLocator(plocUUID);
             }
             if (physicalLocator != null) {