package org.opendaylight.controller.cluster.datastore.persisted;
import com.google.common.annotations.Beta;
+import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.google.common.base.Verify;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
out.writeObject(m);
}
- SerializationUtils.serializeNormalizedNode(rootNode, out);
+ SerializationUtils.writeNormalizedNode(out, rootNode);
}
@Override
private static final long serialVersionUID = 1L;
+ @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "This field is not Serializable but this class "
+ + "implements writeReplace to delegate serialization to a Proxy class and thus instances of this class "
+ + "aren't serialized. FindBugs does not recognize this.")
private final Map<Class<? extends ShardDataTreeSnapshotMetadata<?>>, ShardDataTreeSnapshotMetadata<?>> metadata;
+
+ @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "See above justification.")
private final NormalizedNode<?, ?> rootNode;
public MetadataShardDataTreeSnapshot(final NormalizedNode<?, ?> rootNode) {
return new Proxy(this);
}
+ @Override
+ public String toString() {
+ return MoreObjects.toStringHelper(this).add("metadata", metadata).toString();
+ }
}