X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2FNode.java;h=ecb1f604d5e30c450f8613daf3328ea54f9e220a;hb=43767bb962ade9659c8aa7eb0e02d412a7a54db2;hp=5a71ab8a692fce503c7dddb6d3fc768ec25723f4;hpb=acf200bcdbb1eb7645d803e949fd6133e80baf52;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Node.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Node.java index 5a71ab8a69..ecb1f604d5 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Node.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Node.java @@ -26,7 +26,7 @@ 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; import org.opendaylight.controller.sal.utils.HexEncode; @@ -197,7 +197,7 @@ public class Node implements Serializable { * * @return The node Type for this Node object */ - @XmlAttribute(name = "type") + @XmlElement(name = "type") public String getType() { return this.nodeType; } @@ -244,6 +244,7 @@ public class Node implements Serializable { * * @param type of node to be set */ + @SuppressWarnings("unused") private void setType(String type) { this.nodeType = type; if (this.nodeIDString != null) { @@ -266,7 +267,7 @@ public class Node implements Serializable { * * @return The nodeID in string format */ - @XmlAttribute(name = "id") + @XmlElement(name = "id") public String getNodeIDString() { if (this.nodeType.equals(NodeIDType.OPENFLOW)) { return HexEncode.longToHexString((Long) this.nodeID); @@ -280,6 +281,7 @@ public class Node implements Serializable { * * @param nodeIDString String representation for NodeID */ + @SuppressWarnings("unused") private void setNodeIDString(String nodeIDString) { this.nodeIDString = nodeIDString; if (this.nodeType != null) { @@ -322,10 +324,10 @@ public class Node implements Serializable { @Override public String toString() { if (this.nodeType.equals(NodeIDType.OPENFLOW)) { - return this.nodeType.toString() + "|" + return this.nodeType + "|" + HexEncode.longToHexString((Long) this.nodeID); } else { - return this.nodeType.toString() + "|" + this.nodeID.toString(); + return this.nodeType + "|" + this.nodeID.toString(); } }