Update MRI upstreams for Phosphorus
[openflowplugin.git] / openflowjava / openflow-protocol-api / src / main / java / org / opendaylight / openflowjava / protocol / api / keys / MatchEntryDeserializerKey.java
index ca7360af8b4df5af165dd11979e39245c81bbe57..fcb5aeadcbd216f072503608e2ba9cc3e8e9b233 100644 (file)
@@ -5,10 +5,12 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowjava.protocol.api.keys;
 
+import java.util.Objects;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 /**
  * Key for a match entry deserializer.
@@ -19,7 +21,7 @@ public final class MatchEntryDeserializerKey extends MessageCodeKey
         implements ExperimenterDeserializerKey {
 
     private final int oxmField;
-    private Long experimenterId;
+    private Uint32 experimenterId;
 
     /**
      * Constructor.
@@ -28,8 +30,7 @@ public final class MatchEntryDeserializerKey extends MessageCodeKey
      * @param oxmClass oxm_class (see specification)
      * @param oxmField oxm_field (see specification)
      */
-    public MatchEntryDeserializerKey(short version,
-            int oxmClass, int oxmField) {
+    public MatchEntryDeserializerKey(final Uint8 version, final int oxmClass, final int oxmField) {
         super(version, oxmClass, MatchEntry.class);
         this.oxmField = oxmField;
     }
@@ -39,7 +40,7 @@ public final class MatchEntryDeserializerKey extends MessageCodeKey
      *
      * @param experimenterId experimenter / vendor ID
      */
-    public void setExperimenterId(Long experimenterId) {
+    public void setExperimenterId(final Uint32 experimenterId) {
         this.experimenterId = experimenterId;
     }
 
@@ -53,7 +54,7 @@ public final class MatchEntryDeserializerKey extends MessageCodeKey
     }
 
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(final Object obj) {
         if (this == obj) {
             return true;
         }
@@ -64,11 +65,7 @@ public final class MatchEntryDeserializerKey extends MessageCodeKey
             return false;
         }
         MatchEntryDeserializerKey other = (MatchEntryDeserializerKey) obj;
-        if (experimenterId == null) {
-            if (other.experimenterId != null) {
-                return false;
-            }
-        } else if (!experimenterId.equals(other.experimenterId)) {
+        if (!Objects.equals(experimenterId, other.experimenterId)) {
             return false;
         }
         if (oxmField != other.oxmField) {