X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2FLazyDataTreeModification.java;h=0ec5aa7154cbfd3224583c4cd2fd01c00947141b;hp=2a90f96646a7733056353f898beca3c08bdf3770;hb=0b283e62a5872be1960635d5d6c4d301b1f87df2;hpb=bcc66b3ee07a3bc18176418c4cd211596f49f2f0 diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataTreeModification.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataTreeModification.java index 2a90f96646..0ec5aa7154 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataTreeModification.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataTreeModification.java @@ -15,7 +15,7 @@ import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.yangtools.binding.data.codec.api.BindingCodecTreeNode; +import org.opendaylight.mdsal.binding.dom.codec.api.BindingDataObjectCodecTreeNode; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate; @@ -33,7 +33,8 @@ class LazyDataTreeModification implements DataTreeModifica private final DataTreeIdentifier path; private final DataObjectModification rootNode; - LazyDataTreeModification(final LogicalDatastoreType datastoreType, final InstanceIdentifier path, final BindingCodecTreeNode codec, final DataTreeCandidate domChange) { + LazyDataTreeModification(final LogicalDatastoreType datastoreType, final InstanceIdentifier path, + final BindingDataObjectCodecTreeNode codec, final DataTreeCandidate domChange) { this.path = new DataTreeIdentifier<>(datastoreType, path); this.rootNode = LazyDataObjectModification.create(codec, domChange.getRootNode()); } @@ -49,11 +50,11 @@ class LazyDataTreeModification implements DataTreeModifica } @SuppressWarnings({"unchecked", "rawtypes"}) - static DataTreeModification create(final BindingToNormalizedNodeCodec codec, final DataTreeCandidate domChange, - final LogicalDatastoreType datastoreType) { - final Entry, BindingCodecTreeNode> codecCtx = + static DataTreeModification create(final BindingToNormalizedNodeCodec codec, + final DataTreeCandidate domChange, final LogicalDatastoreType datastoreType) { + final Entry, BindingDataObjectCodecTreeNode> codecCtx = codec.getSubtreeCodec(domChange.getRootPath()); - return (DataTreeModification) new LazyDataTreeModification(datastoreType, codecCtx.getKey(), codecCtx.getValue(), domChange); + return new LazyDataTreeModification(datastoreType, codecCtx.getKey(), codecCtx.getValue(), domChange); } static Collection> from(final BindingToNormalizedNodeCodec codec, @@ -65,4 +66,8 @@ class LazyDataTreeModification implements DataTreeModifica return result; } + @Override + public String toString() { + return getClass().getSimpleName() + "{path = " + path + ", rootNode = " + rootNode + "}"; + } }