X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-dom-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Fdom%2Fcodec%2Fimpl%2FChoiceCodecContext.java;h=810dfdca652c28b0204fad333834cc732e06985d;hb=refs%2Fchanges%2F45%2F109745%2F1;hp=a7ec5fabb26744a05b1317d33d9097cc606f1e20;hpb=74ef67db283874e6024413355267120c77a6095c;p=mdsal.git diff --git a/binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/ChoiceCodecContext.java b/binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/ChoiceCodecContext.java index a7ec5fabb2..810dfdca65 100644 --- a/binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/ChoiceCodecContext.java +++ b/binding/mdsal-binding-dom-codec/src/main/java/org/opendaylight/mdsal/binding/dom/codec/impl/ChoiceCodecContext.java @@ -116,8 +116,8 @@ final class ChoiceCodecContext extends CommonDataObjectCod ., CommonDataObjectCodecPrototype>build(); // Load case statements valid in this choice and keep track of their names - final var choiceType = prototype.getType(); - final var factory = prototype.getFactory(); + final var choiceType = prototype.runtimeType(); + final var factory = prototype.contextFactory(); final var localCases = new HashSet(); for (var caseType : choiceType.validCaseChildren()) { @SuppressWarnings("unchecked") @@ -148,7 +148,7 @@ final class ChoiceCodecContext extends CommonDataObjectCod if (cases.size() != 1) { // Sort all possibilities by their FQCN to retain semi-predictable results final var list = new ArrayList<>(entry.getValue()); - list.sort(Comparator.comparing(proto -> proto.getBindingClass().getCanonicalName())); + list.sort(Comparator.comparing(proto -> proto.javaClass().getCanonicalName())); ambiguousByCaseBuilder.putAll(entry.getKey(), list); } else { unambiguousByCaseBuilder.put(entry.getKey(), cases.iterator().next()); @@ -282,8 +282,8 @@ final class ChoiceCodecContext extends CommonDataObjectCod Ambiguous reference {} to child of {} resolved to {}, the first case in {} This mapping is \ not guaranteed to be stable and is subject to variations based on runtime circumstances. \ Please see the stack trace for hints about the source of ambiguity.""", - type, bindingArg(), result.getBindingClass(), - Lists.transform(inexact, CommonDataObjectCodecPrototype::getBindingClass), new Throwable()); + type, bindingArg(), result.javaClass(), + Lists.transform(inexact, CommonDataObjectCodecPrototype::javaClass), new Throwable()); } } }