Update MRI upstreams for Phosphorus
[openflowplugin.git] / openflowjava / openflow-protocol-api / src / main / java / org / opendaylight / openflowjava / protocol / api / keys / ExperimenterActionSerializerKey.java
index 7da6eb110c7cc5a3434a70f4bc1864d22db8e758..6789fffa28a07c5605f8d7683953fd8dbbb72d94 100644 (file)
@@ -5,11 +5,13 @@
  * 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 org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.action.container.action.choice.ExperimenterIdCase;
+import java.util.Objects;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.experimenter.id.action.ExperimenterIdCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.ExperimenterActionSubType;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 /**
  * Key for an experimenter action serializer.
@@ -27,8 +29,8 @@ public final class ExperimenterActionSerializerKey extends ActionSerializerKey<E
      * @param experimenterId experimenter / vendor ID
      * @param actionSubType vendor defined subtype
      */
-    public ExperimenterActionSerializerKey(short msgVersion, Long experimenterId,
-            Class<? extends ExperimenterActionSubType> actionSubType) {
+    public ExperimenterActionSerializerKey(final Uint8 msgVersion, final Uint32 experimenterId,
+            final Class<? extends ExperimenterActionSubType> actionSubType) {
         super(msgVersion, ExperimenterIdCase.class, experimenterId);
         this.actionSubType = actionSubType;
     }
@@ -42,7 +44,7 @@ public final class ExperimenterActionSerializerKey extends ActionSerializerKey<E
     }
 
     @Override
-    public boolean equals(Object obj) {
+    public boolean equals(final Object obj) {
         if (this == obj) {
             return true;
         }
@@ -53,11 +55,7 @@ public final class ExperimenterActionSerializerKey extends ActionSerializerKey<E
             return false;
         }
         ExperimenterActionSerializerKey other = (ExperimenterActionSerializerKey) obj;
-        if (actionSubType == null) {
-            if (other.actionSubType != null) {
-                return false;
-            }
-        } else if (!actionSubType.equals(other.actionSubType)) {
+        if (!Objects.equals(actionSubType, other.actionSubType)) {
             return false;
         }
         return true;