Make LocalSnapshotStore final 30/109530/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 31 Dec 2023 18:36:31 +0000 (19:36 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 31 Dec 2023 19:49:03 +0000 (19:49 +0000)
We have a SpotBugs suppression which ends up being unnecessary if the
class is final.

Change-Id: If58497303871ae136875c80b8b094276ccda9d64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStore.java

index 75eb7fbd6f142e444dfe187417bde25b2d685773..c7963056753c43a0062440e016dc80b465c79549 100644 (file)
@@ -21,7 +21,6 @@ import akka.serialization.JavaSerializer;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.io.ByteStreams;
 import com.typesafe.config.Config;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -60,7 +59,7 @@ import scala.concurrent.Future;
  *
  * @author Thomas Pantelis
  */
-public class LocalSnapshotStore extends SnapshotStore {
+public final class LocalSnapshotStore extends SnapshotStore {
     private static final Logger LOG = LoggerFactory.getLogger(LocalSnapshotStore.class);
     private static final int PERSISTENCE_ID_START_INDEX = "snapshot-".length();
 
@@ -69,7 +68,6 @@ public class LocalSnapshotStore extends SnapshotStore {
     private final int maxLoadAttempts;
     private final File snapshotDir;
 
-    @SuppressFBWarnings(value = "MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR", justification = "Akka class design")
     public LocalSnapshotStore(final Config config) {
         executionContext = context().system().dispatchers().lookup(config.getString("stream-dispatcher"));
         snapshotDir = new File(config.getString("dir"));