Reorganize AbstractNormalizedNodeDataOutput 90/84590/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 11 Sep 2019 15:44:47 +0000 (17:44 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 23 Sep 2019 03:38:04 +0000 (05:38 +0200)
commit7086c00686a2641790773574c608c1dbb60abd48
treefd0331883826ce27adc645765eddd868e9c82676
parente9fbfe9ccaca6c20cf3d1d9f2831558ba63c2b5b
Reorganize AbstractNormalizedNodeDataOutput

This reorganizes AbstractNormalizedNodeDataOutput so that it
implements all NormalizedNodeDataOutput with final methods,
deferring implementation as need to abstract methods.

This way we have precisely one implementation of public methods,
making it easy to audit for correctness. Furthermore it eliminates
writeAugmentationIdentifier() override in NeonSR2 writer.

It also introduces writeQNameInternal(), which skips header checks,
as the call sites have already performed those checks.

Change-Id: Icb4a7e994c04e3d52bd561d99c7743dfdfd88738
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5f03268912870fdffe366074e581ff18c805216f)
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractLithiumDataOutput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/AbstractNormalizedNodeDataOutput.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/LithiumNormalizedNodeOutputStreamWriter.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/stream/NeonSR2NormalizedNodeOutputStreamWriter.java