ShardSnapshot is final 30/103430/3
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 26 Nov 2022 20:50:07 +0000 (21:50 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 28 Nov 2022 19:18:48 +0000 (20:18 +0100)
There is no point in extending this class, make it final.

Change-Id: I6f73c5be57e6fb58e7c74b5681907ae0f492437d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/DatastoreSnapshot.java

index 6330e5d4c257343a135f62b6e9ac3a8dcd429923..98323fa005d79095371011e932dfe7a3c44c2a16 100644 (file)
@@ -102,7 +102,7 @@ public class DatastoreSnapshot implements Serializable {
         return new Proxy(this);
     }
 
-    public static class ShardSnapshot implements Serializable {
+    public static final class ShardSnapshot implements Serializable {
         private static final long serialVersionUID = 1L;
 
         private static final class Proxy implements Externalizable {
@@ -137,8 +137,8 @@ public class DatastoreSnapshot implements Serializable {
             }
         }
 
-        private final String name;
-        private final Snapshot snapshot;
+        private final @NonNull String name;
+        private final @NonNull Snapshot snapshot;
 
         public ShardSnapshot(@NonNull String name, @NonNull Snapshot snapshot) {
             this.name = requireNonNull(name);