Deprecate NormalizedNodeStreamVersion.{LITHIUM,NEON_SR2} 18/89118/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 18 Apr 2020 08:24:08 +0000 (10:24 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 18 Apr 2020 08:29:47 +0000 (10:29 +0200)
These version are ancient and do not support Uint types. Deprecate
them to steer users away from them.

Change-Id: Ib3d36cc87e1dd6b0043dc7e447f6ce122c678564
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-data-codec-binfmt/src/main/java/org/opendaylight/yangtools/yang/data/codec/binfmt/NormalizedNodeStreamVersion.java

index 3bf680b93abc3cda37df16cfb9badd8358501b6a..b3c7b065fe5d3ce7f42ebb6722ff8ec8906bc8ee 100644 (file)
@@ -23,31 +23,40 @@ public enum NormalizedNodeStreamVersion {
     /**
      * Original stream version, as shipped in OpenDaylight Lithium simultaneous release. The caveat here is that this
      * version has augmented in OpenDaylight Oxygen to retrofit a non-null representation of the empty type.
+     *
+     * @deprecated This version is a historic one and should not be used in code. It does not support current mapping
+     *             of {@code Uint8} et al. and hence results in a stream which needs to be further adapted to current
+     *             definition of LeafNode.
      */
-    // FIXME: 5.0.0: consider deprecating this version
+    @Deprecated
     LITHIUM {
         @Override
-        public NormalizedNodeDataOutput newDataOutput(DataOutput output) {
+        public NormalizedNodeDataOutput newDataOutput(final DataOutput output) {
             return new LithiumNormalizedNodeOutputStreamWriter(output);
         }
     },
     /**
      * Updated stream version, as shipped in OpenDaylight Neon SR2 release. Improves identifier encoding over
      * {@link #LITHIUM}, so that QName caching is more effective.
+     *
+     * @deprecated This version is a historic one and should not be used in code. It does not support current mapping
+     *             of {@code Uint8} et al. and hence results in a stream which needs to be further adapted to current
+     *             definition of LeafNode.
      */
+    @Deprecated
     NEON_SR2 {
         @Override
-        public NormalizedNodeDataOutput newDataOutput(DataOutput output) {
+        public NormalizedNodeDataOutput newDataOutput(final DataOutput output) {
             return new NeonSR2NormalizedNodeOutputStreamWriter(output);
         }
     },
     /**
      * First shipping in Sodium SR1. Improved stream coding to eliminate redundancies present in {@link #NEON_SR2}.
-     * Supports {code Uint8} et al. as well as {@link BigInteger}.
+     * Supports {@code Uint8} et al. as well as {@link BigInteger}.
      */
     SODIUM_SR1 {
         @Override
-        public NormalizedNodeDataOutput newDataOutput(DataOutput output) {
+        public NormalizedNodeDataOutput newDataOutput(final DataOutput output) {
             return new SodiumSR1DataOutput(output);
         }
     },
@@ -57,7 +66,7 @@ public enum NormalizedNodeStreamVersion {
      */
     MAGNESIUM {
         @Override
-        public NormalizedNodeDataOutput newDataOutput(DataOutput output) {
+        public NormalizedNodeDataOutput newDataOutput(final DataOutput output) {
             return new MagnesiumDataOutput(output);
         }
     };