X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fpersisted%2FAbstractVersionedShardDataTreeSnapshot.java;h=7ebb0055f2da2c1fcbbd9f8843ca2abc0c65e560;hb=12fcdfe39aa26dcba7fd3bb4d4c68e3d02e65c51;hp=c12403f81913f4b372c5e9ccfc533ebc7be5d6d6;hpb=aafb8cb044e992dd784d1f4f66508599cc4cd588;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractVersionedShardDataTreeSnapshot.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractVersionedShardDataTreeSnapshot.java index c12403f819..7ebb0055f2 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractVersionedShardDataTreeSnapshot.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/AbstractVersionedShardDataTreeSnapshot.java @@ -8,10 +8,8 @@ package org.opendaylight.controller.cluster.datastore.persisted; import com.google.common.base.Verify; -import java.io.DataInputStream; import java.io.IOException; import java.io.ObjectInput; -import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.util.Optional; import javax.annotation.Nonnull; @@ -28,31 +26,6 @@ import org.slf4j.LoggerFactory; abstract class AbstractVersionedShardDataTreeSnapshot extends ShardDataTreeSnapshot { private static final Logger LOG = LoggerFactory.getLogger(AbstractVersionedShardDataTreeSnapshot.class); - @SuppressWarnings("checkstyle:FallThrough") - @Deprecated - static ShardDataTreeSnapshot deserializePreCarbon(final DataInputStream is) throws IOException { - final PayloadVersion version = PayloadVersion.readFrom(is); - switch (version) { - case BORON: - // Boron snapshots use Java Serialization - try (ObjectInputStream ois = new ObjectInputStream(is)) { - return (ShardDataTreeSnapshot) ois.readObject(); - } catch (ClassNotFoundException e) { - LOG.error("Failed to serialize data tree snapshot", e); - throw new IOException("Snapshot failed to deserialize", e); - } - case TEST_FUTURE_VERSION: - case TEST_PAST_VERSION: - // These versions are never returned and this code is effectively dead - break; - default: - throw new IOException("Invalid payload version in snapshot"); - } - - // Not included as default in above switch to ensure we get warnings when new versions are added - throw new IOException("Encountered unhandled version" + version); - } - @SuppressWarnings("checkstyle:FallThrough") static ShardDataTreeSnapshot versionedDeserialize(final ObjectInput in) throws IOException { final PayloadVersion version = PayloadVersion.readFrom(in);