Migrate nullness annotations
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / AddPrefixShardReplica.java
index 05e1271dd0439618bd7da626d39c5094db66ed93..ba25c0c3c94a6648b464152296b7d61de972b90d 100644 (file)
@@ -5,11 +5,11 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.cluster.datastore.messages;
 
-import com.google.common.base.Preconditions;
-import javax.annotation.Nonnull;
+import static java.util.Objects.requireNonNull;
+
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
 /**
@@ -27,8 +27,8 @@ public class AddPrefixShardReplica {
      * @param prefix prefix of the shard that is to be locally replicated.
      */
 
-    public AddPrefixShardReplica(@Nonnull final YangInstanceIdentifier prefix) {
-        this.prefix = Preconditions.checkNotNull(prefix, "prefix should not be null");
+    public AddPrefixShardReplica(final @NonNull YangInstanceIdentifier prefix) {
+        this.prefix = requireNonNull(prefix, "prefix should not be null");
     }
 
     public YangInstanceIdentifier getShardPrefix() {