X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2Fbase%2Fmessages%2FCaptureSnapshotReply.java;h=1e573014a9ed6596ae6af84df0f724a9e730c34c;hp=82f3e0dce02102034c54d127cdf83374313c61bc;hb=97542f208267cb5392fc8c8d9baf6c1d3ee4ae32;hpb=0f4c2236a45097dcac1d66415cb76aabcc4a873f diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/CaptureSnapshotReply.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/CaptureSnapshotReply.java index 82f3e0dce0..1e573014a9 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/CaptureSnapshotReply.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/CaptureSnapshotReply.java @@ -7,14 +7,21 @@ */ package org.opendaylight.controller.cluster.raft.base.messages; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; public class CaptureSnapshotReply { private final byte [] snapshot; + @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "Stores a reference to an externally mutable byte[] " + + "object but this is OK since this class is merely a DTO and does not process byte[] internally. " + + "Also it would be inefficient to create a copy as the byte[] could be large.") public CaptureSnapshotReply(byte [] snapshot) { this.snapshot = snapshot; } + @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "Exposes a mutable object stored in a field but " + + "this is OK since this class is merely a DTO and does not process the byte[] internally. " + + "Also it would be inefficient to create a return copy as the byte[] could be large.") public byte [] getSnapshot() { return snapshot; }