Bump versions 9.0.4-SNAPSHOT
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / notifications / LeaderStateChanged.java
index 5de794d902d69976aeb0761939aebb4470269d9a..373823ef0ffeaf0ac37140aab1d437c7e4753979 100644 (file)
@@ -7,10 +7,10 @@
  */
 package org.opendaylight.controller.cluster.notifications;
 
-import com.google.common.base.Preconditions;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import static java.util.Objects.requireNonNull;
 
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
 
 /**
  * A local message initiated internally from the RaftActor when some state of a leader has changed.
@@ -18,17 +18,18 @@ import javax.annotation.Nullable;
  * @author Thomas Pantelis
  */
 public class LeaderStateChanged {
-    private final String memberId;
-    private final String leaderId;
+    private final @NonNull String memberId;
+    private final @Nullable String leaderId;
     private final short leaderPayloadVersion;
 
-    public LeaderStateChanged(@Nonnull String memberId, @Nullable String leaderId, short leaderPayloadVersion) {
-        this.memberId = Preconditions.checkNotNull(memberId);
+    public LeaderStateChanged(final @NonNull String memberId, final @Nullable String leaderId,
+            final short leaderPayloadVersion) {
+        this.memberId = requireNonNull(memberId);
         this.leaderId = leaderId;
         this.leaderPayloadVersion = leaderPayloadVersion;
     }
 
-    public @Nonnull String getMemberId() {
+    public @NonNull String getMemberId() {
         return memberId;
     }