X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Ftopology%2FTopoEdgeUpdate.java;h=fff46eafaf99ba48b96d5d5093ad4102daa5bb23;hb=ee36e17cd29fd1b5ebdf895a6deb14c4e1d8c9e2;hp=d8da9c301bb17d0c62848ec29baccfc9ee4edfc7;hpb=fdfe6f9fa93dcfb1b941e61a590b20ea75911791;p=controller.git diff --git a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/topology/TopoEdgeUpdate.java b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/topology/TopoEdgeUpdate.java index d8da9c301b..fff46eafaf 100644 --- a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/topology/TopoEdgeUpdate.java +++ b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/topology/TopoEdgeUpdate.java @@ -10,8 +10,6 @@ package org.opendaylight.controller.sal.topology; import java.util.Set; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.opendaylight.controller.sal.core.Edge; import org.opendaylight.controller.sal.core.Property; @@ -46,7 +44,12 @@ public class TopoEdgeUpdate { @Override public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); + final int prime = 31; + int result = 1; + result = prime * result + ((edge == null) ? 0 : edge.hashCode()); + result = prime * result + ((props == null) ? 0 : props.hashCode()); + result = prime * result + ((type == null) ? 0 : type.hashCode()); + return result; } @Override @@ -57,6 +60,25 @@ public class TopoEdgeUpdate { @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; + TopoEdgeUpdate other = (TopoEdgeUpdate) obj; + if (edge == null) { + if (other.edge != null) + return false; + } else if (!edge.equals(other.edge)) + return false; + if (props == null) { + if (other.props != null) + return false; + } else if (!props.equals(other.props)) + return false; + if (type != other.type) + return false; + return true; } }