Use YangInstanceIdentifier.EMPTY
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / DataExistsReply.java
index e68724a2626766091bd988f60ed54cd1b5fe9b16..b24b51b5de2c6d63a9a5a0bd8d8dc40218c9d997 100644 (file)
@@ -17,8 +17,10 @@ import org.opendaylight.controller.protobuff.messages.transaction.ShardTransacti
 public class DataExistsReply extends VersionedExternalizableMessage {
     private static final long serialVersionUID = 1L;
 
+    @Deprecated
     private static final ShardTransactionMessages.DataExistsReply SERIALIZABLE_TRUE =
             ShardTransactionMessages.DataExistsReply.newBuilder().setExists(true).build();
+    @Deprecated
     private static final ShardTransactionMessages.DataExistsReply SERIALIZABLE_FALSE =
             ShardTransactionMessages.DataExistsReply.newBuilder().setExists(false).build();
 
@@ -48,13 +50,10 @@ public class DataExistsReply extends VersionedExternalizableMessage {
         out.writeBoolean(exists);
     }
 
+    @Deprecated
     @Override
-    public Object toSerializable() {
-        if(getVersion() >= DataStoreVersions.BORON_VERSION) {
-            return this;
-        } else {
-            return exists ? SERIALIZABLE_TRUE : SERIALIZABLE_FALSE;
-        }
+    protected Object newLegacySerializedInstance() {
+        return exists ? SERIALIZABLE_TRUE : SERIALIZABLE_FALSE;
     }
 
     public static DataExistsReply fromSerializable(final Object serializable) {