Sprinkle @NonNull on FrontendClientMetadataBuilder fields 00/98300/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 6 Nov 2021 09:18:02 +0000 (10:18 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 6 Nov 2021 10:20:35 +0000 (11:20 +0100)
We have two fields which are guaranteed to be @NonNull, mark them as
such, making it clear we comply to getIdentifier() contract.

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

index 7e6eced..475d2e6 100644 (file)
@@ -247,8 +247,8 @@ abstract class FrontendClientMetadataBuilder implements Builder<FrontendClientMe
 
     private static final Logger LOG = LoggerFactory.getLogger(FrontendClientMetadataBuilder.class);
 
-    private final ClientIdentifier identifier;
-    private final String shardName;
+    private final @NonNull ClientIdentifier identifier;
+    private final @NonNull String shardName;
 
     FrontendClientMetadataBuilder(final String shardName, final ClientIdentifier identifier) {
         this.shardName = requireNonNull(shardName);