Fix checkstyle violations in openflow-protocol-api
[openflowplugin.git] / openflowjava / openflow-protocol-api / src / main / java / org / opendaylight / openflowjava / protocol / api / keys / InstructionSerializerKey.java
index 213b22dbf19273ed3c0362bf8ffd588cc234ae60..ad2e1400ff02b19f7e75fbcb904e615f9184c384 100644 (file)
@@ -12,16 +12,20 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 
 /**
+ * Key for an instruction serializer.
+ *
  * @author michal.polkorab
  * @param <T> instruction type
  */
 public class InstructionSerializerKey<T extends InstructionChoice>
         extends MessageTypeKey<Instruction> implements ExperimenterSerializerKey {
 
-    private Class<T> instructionType;
-    private Long experimenterId;
+    private final Class<T> instructionType;
+    private final Long experimenterId;
 
     /**
+     * Constructor.
+     *
      * @param msgVersion protocol wire version
      * @param instructionType type of instruction
      * @param experimenterId experimenter / vendor ID
@@ -37,8 +41,8 @@ public class InstructionSerializerKey<T extends InstructionChoice>
     public int hashCode() {
         final int prime = 31;
         int result = super.hashCode();
-        result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
-        result = prime * result + ((instructionType == null) ? 0 : instructionType.hashCode());
+        result = prime * result + (experimenterId == null ? 0 : experimenterId.hashCode());
+        result = prime * result + (instructionType == null ? 0 : instructionType.hashCode());
         return result;
     }