Hide CodecContextSupplier
[mdsal.git] / binding / mdsal-binding-dom-codec / src / main / java / org / opendaylight / mdsal / binding / dom / codec / impl / ChoiceCodecContext.java
index 9e55f2da29a157b1e58fcbefdad02380f14f2c19..a7ec5fabb26744a05b1317d33d9097cc606f1e20 100644 (file)
@@ -238,7 +238,7 @@ final class ChoiceCodecContext<D extends DataObject> extends CommonDataObjectCod
             return null;
         }
         final var caze = byYangCaseChild.get(first.name());
-        return ((CaseCodecContext<D>) caze.get()).deserialize(data);
+        return ((CaseCodecContext<D>) caze.getCodecContext()).deserialize(data);
     }
 
     @Override
@@ -288,7 +288,8 @@ final class ChoiceCodecContext<D extends DataObject> extends CommonDataObjectCod
             }
         }
 
-        return childNonNull(result, type, "Class %s is not child of any cases for %s", type, bindingArg()).get();
+        return childNonNull(result, type, "Class %s is not child of any cases for %s", type, bindingArg())
+            .getCodecContext();
     }
 
     /**