Bug 2410: Use generated serialVersionUID for messages
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / main / java / org / opendaylight / controller / remote / rpc / messages / ExecuteRpc.java
index 030d81ac7edd1293709af83ebcf4a8f07d8c6cc2..5d780be641e2cce6d2b48a2628cd675f9a24c8ee 100644 (file)
@@ -8,25 +8,29 @@
 package org.opendaylight.controller.remote.rpc.messages;
 
 
-import org.opendaylight.yangtools.yang.common.QName;
-
+import com.google.common.base.Preconditions;
 import java.io.Serializable;
+import org.opendaylight.yangtools.yang.common.QName;
 
 public class ExecuteRpc implements Serializable {
+    private static final long serialVersionUID = 1128904894827335676L;
+
+    private final String inputCompositeNode;
+    private final QName rpc;
 
-  private String inputCompositeNode;
-  private QName rpc;
+    public ExecuteRpc(final String inputCompositeNode, final QName rpc) {
+        Preconditions.checkNotNull(inputCompositeNode, "Composite Node input string should be present");
+        Preconditions.checkNotNull(rpc, "rpc Qname should not be null");
 
-  public ExecuteRpc(String inputCompositeNode, QName rpc) {
-    this.inputCompositeNode = inputCompositeNode;
-    this.rpc = rpc;
-  }
+        this.inputCompositeNode = inputCompositeNode;
+        this.rpc = rpc;
+    }
 
-  public String getInputCompositeNode() {
-    return inputCompositeNode;
-  }
+    public String getInputCompositeNode() {
+        return inputCompositeNode;
+    }
 
-  public QName getRpc() {
-    return rpc;
-  }
+    public QName getRpc() {
+        return rpc;
+    }
 }