BUG-5280: remove support for talking to pre-Boron clients
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / VersionedExternalizableMessage.java
index 60f51dd..51a9079 100644 (file)
@@ -44,15 +44,13 @@ public abstract class VersionedExternalizableMessage implements Externalizable,
         out.writeShort(version);
     }
 
-    /**
-     * @deprecated Pre-Boron compatibility.
-     */
-    @Deprecated
-    protected abstract Object newLegacySerializedInstance();
-
     @Override
     public final Object toSerializable() {
-        return getVersion() >= DataStoreVersions.BORON_VERSION ? this : newLegacySerializedInstance();
+        if (getVersion() < DataStoreVersions.BORON_VERSION) {
+            throw new UnsupportedOperationException("Versions prior to " + DataStoreVersions.BORON_VERSION + " are not supported");
+        }
+
+        return this;
     }
 
     @Override