Merge "Sonar issues"
authorJozef Bacigal <jozef.bacigal@pantheon.tech>
Fri, 5 Aug 2016 08:52:53 +0000 (08:52 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 5 Aug 2016 08:52:53 +0000 (08:52 +0000)
1  2 
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/registry/flow/FlowRegistryKeyFactory.java

index 026aceedf2541b9b87526b5256e95d74649cb159,3919aa3c7553bc3d8cb1af2c7526ae92f029ac98..889e30a2c21f606852e154ce7ca14394973ee74b
@@@ -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 &lt;mbobak@cisco.com&gt; on 8.4.2015.
   */
  public class FlowRegistryKeyFactory {
      private FlowRegistryKeyFactory() {
          // Hide implicit constructor
      }
  
              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;
          }