X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Faction%2FOutput.java;h=5bd9efb30b691ad2775c2687f15538ff2783f332;hb=f39d905d65a6cbf23990f8c680a22402f19213ea;hp=8c23da8cfa2c80bf79d71296de60ff0b9d68d2f4;hpb=42210c03b0a4c54706320ba9f55794c0abd4d201;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Output.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Output.java index 8c23da8cfa..5bd9efb30b 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Output.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/action/Output.java @@ -1,4 +1,3 @@ - /* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * @@ -14,31 +13,27 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; import org.opendaylight.controller.sal.core.NodeConnector; /** * Represents the action of sending the packet out of a physical port - * - * - * */ @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) - public class Output extends Action { - @XmlElement + private static final long serialVersionUID = 1L; + @XmlElement private NodeConnector port; /* Dummy constructor for JAXB */ - private Output () { + @SuppressWarnings("unused") + private Output() { } public Output(NodeConnector port) { type = ActionType.OUTPUT; this.port = port; - //checkValue(port); + // checkValue(port); } public NodeConnector getPort() { @@ -46,13 +41,33 @@ public class Output extends Action { } @Override - public boolean equals(Object other) { - return EqualsBuilder.reflectionEquals(this, other); + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!super.equals(obj)) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + Output other = (Output) obj; + if (port == null) { + if (other.port != null) { + return false; + } + } else if (!port.equals(other.port)) { + return false; + } + return true; } @Override public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); + final int prime = 31; + int result = super.hashCode(); + result = prime * result + ((port == null) ? 0 : port.hashCode()); + return result; } @Override