This is an internal remnant from when we did not have a ChoiceIn
intermediate class. Mark it for removal.
JIRA: MDSAL-696
Change-Id: I50217ccfd6ff4c6c7db58e1085fa253779732e8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
throw new IllegalArgumentException("Unsupported type " + getBindingClass() + " " + schema);
}
throw new IllegalArgumentException("Unsupported type " + getBindingClass() + " " + schema);
}
+ // FIXME: eliminate with above createInstance() item
boolean isChoice() {
return schema instanceof ChoiceSchemaNode;
}
boolean isChoice() {
return schema instanceof ChoiceSchemaNode;
}
}
final DataContainerCodecPrototype<?> childProto = loadChildPrototype(retClass);
}
final DataContainerCodecPrototype<?> childProto = loadChildPrototype(retClass);
- tmpDataObjects.put(method, childProto.getBindingClass());
- byStreamClassBuilder.put(childProto.getBindingClass(), childProto);
+ final Class<?> childClass = childProto.getBindingClass();
+ tmpDataObjects.put(method, childClass);
+ byStreamClassBuilder.put(childClass, childProto);
byYangBuilder.put(childProto.getYangArg(), childProto);
byYangBuilder.put(childProto.getYangArg(), childProto);
+
+ // FIXME: It really feels like we should be specializing DataContainerCodecPrototype so as to ditch
+ // createInstance() and then we could do an instanceof check instead.
if (childProto.isChoice()) {
final ChoiceNodeCodecContext<?> choice = (ChoiceNodeCodecContext<?>) childProto.get();
for (final Class<?> cazeChild : choice.getCaseChildrenClasses()) {
if (childProto.isChoice()) {
final ChoiceNodeCodecContext<?> choice = (ChoiceNodeCodecContext<?>) childProto.get();
for (final Class<?> cazeChild : choice.getCaseChildrenClasses()) {