Fix FindBugs warnings in sal-akk-raft
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / client / messages / GetSnapshotReply.java
index f3521deb3b2b8ef89bf70ef3e4ea2e63a77ac8a0..2918c5e75250e08223777819a6f82422b0af460a 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.cluster.raft.client.messages;
 
 import com.google.common.base.Preconditions;
 package org.opendaylight.controller.cluster.raft.client.messages;
 
 import com.google.common.base.Preconditions;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import javax.annotation.Nonnull;
 
 /**
 import javax.annotation.Nonnull;
 
 /**
@@ -29,6 +30,9 @@ public class GetSnapshotReply {
         return id;
     }
 
         return id;
     }
 
+    @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.")
     @Nonnull
     public byte[] getSnapshot() {
         return snapshot;
     @Nonnull
     public byte[] getSnapshot() {
         return snapshot;