- final BindingStructuralType type = BindingStructuralType.from(domChildNode);
- if (type != BindingStructuralType.NOT_ADDRESSABLE) {
- /*
- * Even if type is UNKNOWN, from perspective of BindingStructuralType
- * we try to load codec for it. We will use that type to further specify
- * debug log.
- */
- try {
- final BindingCodecTreeNode<?> childCodec =
- parentCodec.yangPathArgumentChild(domChildNode.getIdentifier());
- populateList(result,type, childCodec, domChildNode);
- } catch (final IllegalArgumentException e) {
- if (type == BindingStructuralType.UNKNOWN) {
- LOG.debug("Unable to deserialize unknown DOM node {}",domChildNode,e);
- } else {
- LOG.debug("Binding representation for DOM node {} was not found",domChildNode,e);
+ if (domChildNode.getModificationType() != UNMODIFIED) {
+ final BindingStructuralType type = BindingStructuralType.from(domChildNode);
+ if (type != BindingStructuralType.NOT_ADDRESSABLE) {
+ /*
+ * Even if type is UNKNOWN, from perspective of BindingStructuralType
+ * we try to load codec for it. We will use that type to further specify
+ * debug log.
+ */
+ try {
+ final BindingCodecTreeNode childCodec = parentCodec.yangPathArgumentChild(
+ domChildNode.getIdentifier());
+ verify(childCodec instanceof BindingDataObjectCodecTreeNode, "Unhandled codec %s for type %s",
+ childCodec, type);
+ populateList(result, type, (BindingDataObjectCodecTreeNode<?>) childCodec, domChildNode);
+ } catch (final IllegalArgumentException e) {
+ if (type == BindingStructuralType.UNKNOWN) {
+ LOG.debug("Unable to deserialize unknown DOM node {}", domChildNode, e);
+ } else {
+ LOG.debug("Binding representation for DOM node {} was not found", domChildNode, e);
+ }