Improve LocalProxyTransaction.doExists()
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / AddShardReplica.java
index fd20d20c0bdccaa8730bd643d32c756c78758e8b..d8121bc0351a6a119009651e333f27d787addd5d 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 javax.annotation.Nonnull;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
+import org.eclipse.jdt.annotation.NonNull;
 
 /**
  * A message sent to the ShardManager to dynamically add a new local shard
@@ -26,17 +26,16 @@ public class AddShardReplica {
      *
      * @param shardName name of the shard that is to be locally replicated.
      */
-
-    public AddShardReplica (@Nonnull String shardName){
-        this.shardName = Preconditions.checkNotNull(shardName, "ShardName should not be null");
+    public AddShardReplica(@NonNull String shardName) {
+        this.shardName = requireNonNull(shardName, "ShardName should not be null");
     }
 
-    public String getShardName(){
+    public String getShardName() {
         return this.shardName;
     }
 
     @Override
-    public String toString(){
+    public String toString() {
         return "AddShardReplica[ShardName=" + shardName + "]";
     }
 }