Bump upstreams
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / concepts / Message.java
index 86c91ef9553bd421085d079687d049d442e64ae4..3c8ce59b89e6949fd7a2b63230b01372e76ef866 100644 (file)
@@ -146,12 +146,12 @@ public abstract class Message<T extends WritableIdentifier, C extends Message<T,
      */
     @SuppressWarnings("unchecked")
     public final @NonNull C toVersion(final @NonNull ABIVersion toVersion) {
-        if (this.version == toVersion) {
+        if (version == toVersion) {
             return (C)this;
         }
 
         return switch (toVersion) {
-            case BORON, NEON_SR2, SODIUM_SR1, MAGNESIUM -> verifyNotNull(cloneAsVersion(toVersion));
+            case POTASSIUM -> verifyNotNull(cloneAsVersion(toVersion));
             default -> throw new IllegalArgumentException("Unhandled ABI version " + toVersion);
         };
     }