From af406fdd1a948e05014b95e2d23d59cda1ebd837 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sun, 14 Feb 2016 00:24:06 +0100 Subject: [PATCH] Make FollowerInitialSyncUpStatus final Change-Id: Ie39c26f077311e0ec5b9dd9b8734bdfabf26b581 Signed-off-by: Robert Varga --- .../base/messages/FollowerInitialSyncUpStatus.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java index 72b5ac9515..d2100cb950 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/FollowerInitialSyncUpStatus.java @@ -8,28 +8,30 @@ package org.opendaylight.controller.cluster.raft.base.messages; +import com.google.common.base.Preconditions; +import javax.annotation.Nonnull; + /** * The FollowerInitialSyncUpStatus is sent by a Follower to inform any RaftActor subclass whether the Follower * is at least at the same commitIndex as the Leader was when it sent the follower the very first heartbeat. * * This status can be used to determine if a Follower has caught up with the current Leader in an upgrade scenario * for example. - * */ -public class FollowerInitialSyncUpStatus { +public final class FollowerInitialSyncUpStatus { private final boolean initialSyncDone; private final String name; - public FollowerInitialSyncUpStatus(boolean initialSyncDone, String name){ + public FollowerInitialSyncUpStatus(final boolean initialSyncDone, @Nonnull final String name) { this.initialSyncDone = initialSyncDone; - this.name = name; + this.name = Preconditions.checkNotNull(name); } public boolean isInitialSyncDone() { return initialSyncDone; } - public String getName() { + @Nonnull public String getName() { return name; } } -- 2.36.6