Bump upstreams
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / VersionedExternalizableMessage.java
index 687905d7225991b4bf266987e93bed153368485c..9548a7ebdc7d4432c6e162915f8e353c04dc4477 100644 (file)
@@ -20,6 +20,7 @@ import org.opendaylight.yangtools.yang.data.codec.binfmt.NormalizedNodeStreamVer
  *
  * @author Thomas Pantelis
  */
+@Deprecated(since = "9.0.0", forRemoval = true)
 public abstract class VersionedExternalizableMessage implements Externalizable, SerializableMessage {
     private static final long serialVersionUID = 1L;
 
@@ -38,10 +39,10 @@ public abstract class VersionedExternalizableMessage implements Externalizable,
     }
 
     protected final @NonNull NormalizedNodeStreamVersion getStreamVersion() {
-        if (version >= DataStoreVersions.PHOSPHORUS_VERSION) {
+        if (version >= DataStoreVersions.POTASSIUM_VERSION) {
+            return NormalizedNodeStreamVersion.POTASSIUM;
+        } else if (version >= DataStoreVersions.PHOSPHORUS_VERSION) {
             return NormalizedNodeStreamVersion.MAGNESIUM;
-        } else if (version == DataStoreVersions.SODIUM_SR1_VERSION) {
-            return NormalizedNodeStreamVersion.SODIUM_SR1;
         } else {
             throw new IllegalStateException("Unsupported version " + version);
         }