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.BindingCodecTreeNode;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
private final DataTreeIdentifier<T> path;
private final DataObjectModification<T> rootNode;
- LazyDataTreeModification(final LogicalDatastoreType datastoreType, final InstanceIdentifier<T> path, final BindingCodecTreeNode<T> codec, final DataTreeCandidate domChange) {
+ LazyDataTreeModification(final LogicalDatastoreType datastoreType, final InstanceIdentifier<T> path,
+ final BindingCodecTreeNode<T> codec, final DataTreeCandidate domChange) {
this.path = new DataTreeIdentifier<>(datastoreType, path);
this.rootNode = LazyDataObjectModification.create(codec, domChange.getRootNode());
}
}
@SuppressWarnings({"unchecked", "rawtypes"})
- static <T extends DataObject> DataTreeModification<T> create(final BindingToNormalizedNodeCodec codec, final DataTreeCandidate domChange,
- final LogicalDatastoreType datastoreType) {
+ static <T extends DataObject> DataTreeModification<T> create(final BindingToNormalizedNodeCodec codec,
+ final DataTreeCandidate domChange, final LogicalDatastoreType datastoreType) {
final Entry<InstanceIdentifier<?>, BindingCodecTreeNode<?>> codecCtx =
codec.getSubtreeCodec(domChange.getRootPath());
- return (DataTreeModification<T>) new LazyDataTreeModification(datastoreType, codecCtx.getKey(), codecCtx.getValue(), domChange);
+ return new LazyDataTreeModification(datastoreType, codecCtx.getKey(), codecCtx.getValue(), domChange);
}
static <T extends DataObject> Collection<DataTreeModification<T>> from(final BindingToNormalizedNodeCodec codec,
return result;
}
+ @Override
+ public String toString() {
+ return getClass().getSimpleName() + "{path = " + path + ", rootNode = " + rootNode + "}";
+ }
}