X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fnode%2Futils%2Fstream%2FAbstractLithiumDataInput.java;h=16bc11237ea1a6cb664ab3e2e886c4edf37bf111;hp=05864cdda24859235c14d1d13be93bfaa9836294;hb=ad7135c49d0ec5f7180b46fe3657349c5d81bc63;hpb=32de58ddec79025c40342566a93fb8bf52077334 diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractLithiumDataInput.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractLithiumDataInput.java index 05864cdda2..16bc11237e 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractLithiumDataInput.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractLithiumDataInput.java @@ -26,7 +26,6 @@ import java.util.Set; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.dom.DOMSource; -import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.controller.cluster.datastore.node.utils.QNameFactory; import org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate; import org.opendaylight.yangtools.yang.common.Empty; @@ -38,7 +37,6 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdent import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeWithValue; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument; import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter; -import org.opendaylight.yangtools.yang.model.api.SchemaPath; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Element; @@ -50,23 +48,16 @@ import org.xml.sax.SAXException; * nodes. This process goes in recursive manner, where each NodeTypes object signifies the start of the object, except * END_NODE. If a node can have children, then that node's end is calculated based on appearance of END_NODE. */ -abstract class AbstractLithiumDataInput extends ForwardingDataInput implements NormalizedNodeDataInput { +abstract class AbstractLithiumDataInput extends AbstractNormalizedNodeDataInput { private static final Logger LOG = LoggerFactory.getLogger(AbstractLithiumDataInput.class); - private final @NonNull DataInput input; - private final List codedStringMap = new ArrayList<>(); private QName lastLeafSetQName; AbstractLithiumDataInput(final DataInput input) { - this.input = requireNonNull(input); - } - - @Override - final DataInput delegate() { - return input; + super(input); } @Override @@ -409,18 +400,6 @@ abstract class AbstractLithiumDataInput extends ForwardingDataInput implements N return new String(bytes, StandardCharsets.UTF_8); } - @Override - public final SchemaPath readSchemaPath() throws IOException { - final boolean absolute = input.readBoolean(); - final int size = input.readInt(); - - final Builder qnames = ImmutableList.builderWithExpectedSize(size); - for (int i = 0; i < size; ++i) { - qnames.add(readQName()); - } - return SchemaPath.create(qnames.build(), absolute); - } - @Override public final YangInstanceIdentifier readYangInstanceIdentifier() throws IOException { return readYangInstanceIdentifierInternal();