Migrate Optional.get() callers
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / AugmentableCodecDataObject.java
index ac5e97c25d51247e50d9fc79c71e6e678fd1b490..dcee340dd53edb6616e9ac8cecf0af01d73b7a2b 100644 (file)
@@ -63,7 +63,7 @@ public abstract class AugmentableCodecDataObject<T extends DataObject & Augmenta
         final Optional<DataContainerCodecContext<?, ?>> optAugCtx = codecContext().possibleStreamChild(
             (Class) augmentationType);
         if (optAugCtx.isPresent()) {
-            final DataContainerCodecContext<?, ?> augCtx = optAugCtx.get();
+            final DataContainerCodecContext<?, ?> augCtx = optAugCtx.orElseThrow();
             // Due to binding specification not representing grouping instantiations we can end up having the same
             // augmentation applied to a grouping multiple times. While these augmentations have the same shape, they
             // are still represented by distinct binding classes and therefore we need to make sure the result matches