Migrate Optional.get() callers
[mdsal.git] / dom / mdsal-dom-broker / src / main / java / org / opendaylight / mdsal / dom / broker / DOMRpcRouter.java
index a3524547c1ed95bc6170986ee0d8dabafba2597d..d5732066d798ef235e31d2ab329444bd475c6d14 100644 (file)
@@ -593,7 +593,7 @@ public final class DOMRpcRouter extends AbstractRegistration
 
             // Routing key is present, attempt to deliver as a routed RPC
             if (maybeKey.isPresent()) {
-                final NormalizedNode key = maybeKey.get();
+                final NormalizedNode key = maybeKey.orElseThrow();
                 final Object value = key.body();
                 if (value instanceof YangInstanceIdentifier iid) {
                     // Find a DOMRpcImplementation for a specific iid