Migrate users of Optional.get()
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / transactions / md / OvsdbAutoAttachRemovedCommand.java
index 196a6b7cb394d1a0fd98411e1ebb26bb611295e8..ad86bc6a3cbd7eb9c5fd90b97327b4ae215ffe77 100644 (file)
@@ -54,17 +54,17 @@ public class OvsdbAutoAttachRemovedCommand extends AbstractTransactionCommand {
                     SouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance().getNodeId());
             // FIXME: Iterate on external_ids instead of uuid when Open vSwitch supports external_ids column
             for (final UUID autoAttachUuid : removedAutoAttachRows.keySet()) {
-                final AutoattachKey autoAttachKey = getAutoAttachKeyToRemove(ovsdbNode.get(), autoAttachUuid);
+                final AutoattachKey autoAttachKey = getAutoAttachKeyToRemove(ovsdbNode.orElseThrow(), autoAttachUuid);
                 if (autoAttachKey != null) {
                     final InstanceIdentifier<Autoattach> iid = ovsdbNodeIid
                             .augmentation(OvsdbNodeAugmentation.class)
                             .child(Autoattach.class, autoAttachKey);
                     transaction.delete(LogicalDatastoreType.OPERATIONAL, iid);
                     LOG.debug("AutoAttach table {} for Ovsdb Node {} is deleted", autoAttachUuid,
-                            ovsdbNode.get().getNodeId());
+                            ovsdbNode.orElseThrow().getNodeId());
                 } else {
                     LOG.warn("AutoAttach table {} not found for Ovsdb Node {} to delete", autoAttachUuid,
-                            ovsdbNode.get().getNodeId());
+                            ovsdbNode.orElseThrow().getNodeId());
                 }
             }
         }