From: Jozef Bacigal Date: Fri, 5 Aug 2016 08:52:53 +0000 (+0000) Subject: Merge "Sonar issues" X-Git-Tag: release/boron~53 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=3c34de49abdc57fe13181e370e61e06a1e0ca658;hp=-c;p=openflowplugin.git Merge "Sonar issues" --- 3c34de49abdc57fe13181e370e61e06a1e0ca658 diff --combined openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/registry/flow/FlowRegistryKeyFactory.java index 026aceedf2,3919aa3c75..889e30a2c2 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/registry/flow/FlowRegistryKeyFactory.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/registry/flow/FlowRegistryKeyFactory.java @@@ -13,7 -13,6 +13,7 @@@ import com.google.common.base.Precondit import java.math.BigInteger; import org.opendaylight.openflowplugin.api.OFConstants; import org.opendaylight.openflowplugin.api.openflow.registry.flow.FlowRegistryKey; +import org.opendaylight.openflowplugin.impl.util.MatchComparatorFactory; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder; @@@ -22,6 -21,7 +22,7 @@@ * Created by Martin Bobak <mbobak@cisco.com> on 8.4.2015. */ public class FlowRegistryKeyFactory { + private FlowRegistryKeyFactory() { // Hide implicit constructor } @@@ -58,15 -58,13 +59,15 @@@ return getPriority() == that.getPriority() && getTableId() == that.getTableId() && - getMatch().equals(that.getMatch()); + getCookie().equals(that.getCookie()) && + MatchComparatorFactory.createMatch().areObjectsEqual(getMatch(), that.getMatch()); } @Override public int hashCode() { int result = tableId; result = 31 * result + priority; + result = 31 * result + cookie.hashCode(); result = 31 * result + match.hashCode(); return result; }