Merge "Remove remoterpc dead code."
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / core / NodeTable.java
index 22c379614dbd0657d0d97e556a06f48a25b91309..349e68d98d56eb5bc99c58060973508cf24883c8 100644 (file)
@@ -14,7 +14,6 @@ import java.util.concurrent.ConcurrentHashMap;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
@@ -118,6 +117,7 @@ public class NodeTable implements Serializable {
     /**
      * Private constructor used for JAXB mapping
      */
+    @SuppressWarnings("unused")
     private NodeTable() {
         this.nodeTableIDString = null;
         this.nodeTableID = null;
@@ -176,11 +176,12 @@ public class NodeTable implements Serializable {
     }
 
     /**
-     * @param type the nodeTableType to set
-     *
      * Private setter for nodeConnectorType to be called by JAXB not by anyone
      * else, NodeConnector is immutable
+     *
+     * @param type the nodeTableType to set
      */
+    @SuppressWarnings("unused")
     private void setType(String type) {
         this.nodeTableType = type;
         if (this.nodeTableIDString != null) {
@@ -205,9 +206,9 @@ public class NodeTable implements Serializable {
     /**
      * @return the nodeTableIDString
      */
-    @XmlAttribute(name = "id")
+    @XmlElement(name = "id")
     public String getNodeTableIDString() {
-        return this.nodeTableIDString.toString();
+        return this.nodeTableIDString != null? this.nodeTableIDString : nodeTableID.toString();
     }
 
     /**
@@ -291,7 +292,7 @@ public class NodeTable implements Serializable {
     }
 
     public String getNodeTableIdAsString() {
-        return this.nodeTableType.toString() + "|"
+        return this.nodeTableType + "|"
                 + this.nodeTableID.toString();
     }