X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2FContainerFlow.java;h=ebf623b7b00ff8bcf9dd784530b61de735bb0839;hb=18fa9cb41678400d1decd007a66fc1f7be894f66;hp=acb3e19f69da6a88a2b8f1a0cda1d2f258b7c70a;hpb=42210c03b0a4c54706320ba9f55794c0abd4d201;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java index acb3e19f69..ebf623b7b0 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/ContainerFlow.java @@ -11,8 +11,6 @@ package org.opendaylight.controller.sal.core; import java.io.Serializable; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; import org.opendaylight.controller.sal.action.Action; import org.opendaylight.controller.sal.action.SetDlType; import org.opendaylight.controller.sal.action.SetNwDst; @@ -48,12 +46,27 @@ public class ContainerFlow implements Serializable { @Override public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); + final int prime = 31; + int result = 1; + result = prime * result + ((match == null) ? 0 : match.hashCode()); + return result; } @Override public boolean equals(Object obj) { - return EqualsBuilder.reflectionEquals(this, obj); + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ContainerFlow other = (ContainerFlow) obj; + if (match == null) { + if (other.match != null) + return false; + } else if (!match.equals(other.match)) + return false; + return true; } @Override @@ -114,7 +127,7 @@ public class ContainerFlow implements Serializable { /** * Returns whether the specified match is allowed * - * @param match the match to test + * @param match the match to test * @return true if the match is allowed, false otherwise */ public boolean allowsMatch(Match target) {