Remove deprecated Snapshot and related code
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / persisted / ShardDataTreeSnapshot.java
index 1dbab16c7ba118586040e196d43dc4cdeef636a8..fd35046f04630461da0128ea7aaadd243df48a1c 100644 (file)
@@ -8,10 +8,7 @@
 package org.opendaylight.controller.cluster.datastore.persisted;
 
 import com.google.common.annotations.Beta;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.util.Optional;
@@ -32,24 +29,6 @@ public abstract class ShardDataTreeSnapshot {
         // Hidden to prevent subclassing from outside of this package
     }
 
-    @Deprecated
-    public static ShardDataTreeSnapshot deserializePreCarbon(final byte[] bytes) throws IOException {
-        try (InputStream is = new ByteArrayInputStream(bytes)) {
-            try (DataInputStream dis = new DataInputStream(is)) {
-                final ShardDataTreeSnapshot ret = AbstractVersionedShardDataTreeSnapshot.deserializePreCarbon(dis);
-
-                // Make sure we consume all bytes, otherwise something went very wrong
-                final int bytesLeft = dis.available();
-                if (bytesLeft != 0) {
-                    throw new IOException("Deserialization left " + bytesLeft + " in the buffer");
-                }
-
-
-                return ret;
-            }
-        }
-    }
-
     public static ShardDataTreeSnapshot deserialize(final ObjectInput in) throws IOException {
         final ShardDataTreeSnapshot ret = AbstractVersionedShardDataTreeSnapshot.versionedDeserialize(in);