Fix checkstyle violations in openflow-protocol-impl - part 2 83/67383/2
authorTom Pantelis <tompantelis@gmail.com>
Sat, 20 Jan 2018 21:10:55 +0000 (16:10 -0500)
committerTom Pantelis <tompantelis@gmail.com>
Sat, 27 Jan 2018 02:29:53 +0000 (21:29 -0500)
Many violations - more to follow

Change-Id: I360cd3cd431d1c05df1262df8debeb68f95ffac9
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
75 files changed:
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/AbstractActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10EnqueueActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10OutputActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetDlDstActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetDlSrcActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetNwDstActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetNwSrcActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetNwTosActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetTpDstActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetTpSrcActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetVlanPcpActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10SetVlanVidActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF10StripVlanActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13CopyTtlInActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13CopyTtlOutActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13DecMplsTtlActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13DecNwTtlActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13GroupActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13OutputActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13PopMplsActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13PopPbbActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13PopVlanActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13PushMplsActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13PushPbbActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13PushVlanActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetFieldActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetMplsTtlActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetNwTtlActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/action/OF13SetQueueActionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/BarrierInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/EchoRequestMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/ErrorMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/ExperimenterMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FeaturesReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FlowModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/FlowRemovedMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GetAsyncReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GetAsyncRequestMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GetQueueConfigInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/GroupModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/HelloMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MeterModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/MultipartRequestInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10ErrorMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FeaturesReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FeaturesRequestMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FlowModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10FlowRemovedMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10GetQueueConfigInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10HelloMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PacketInMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PacketOutInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PortModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10PortStatusMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10QueueGetConfigReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/OF10StatsRequestInputFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PacketInMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PacketOutInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PortModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/PortStatusMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/QueueGetConfigReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/RoleReplyMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/RoleRequestInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/SetAsyncInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/TableModInputMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/factories/VendorMessageFactory.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/AbstractActionInstructionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/ApplyActionsInstructionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/ClearActionsInstructionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/GoToTableInstructionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/MeterInstructionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/WriteActionsInstructionDeserializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/instruction/WriteMetadataInstructionDeserializer.java

index 10c65f5b6586137621f854075ed90bab6b480341..3896c9ff7044ab37db85c300662d2ce520b2d4cf 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
@@ -18,8 +17,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * Base class for action deserializers.
  *
+ * @author michal.polkorab
  */
 public abstract class AbstractActionDeserializer implements OFDeserializer<Action>,
         HeaderDeserializer<Action> {
index d4416dcd6fb2000b41c051b4dbc11acfe04b73e5..abbfc4072746e6276dec326d0cb14dee4b971684 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -22,16 +21,17 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.QueueId;
 
 /**
- * @author michal.polkorab
+ * OF10EnqueueActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10EnqueueActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
-        EnqueueCaseBuilder caseBuilder = new EnqueueCaseBuilder();
+        final EnqueueCaseBuilder caseBuilder = new EnqueueCaseBuilder();
         EnqueueActionBuilder actionBuilder = new EnqueueActionBuilder();
         actionBuilder.setPort(new PortNumber((long) input.readUnsignedShort()));
         input.skipBytes(ActionConstants.PADDING_IN_ENQUEUE_ACTION);
index 073e9c5fc1ae2be3d1798b24fe80e8630daac5c9..f4eb99286f6a7af118b5e9b732b0d2e834c757eb 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.OutputActionCaseBuilder;
@@ -19,14 +18,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 
 /**
- * @author michal.polkorab
+ * OF10OutputActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10OutputActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         OutputActionCaseBuilder caseBuilder = new OutputActionCaseBuilder();
         OutputActionBuilder actionBuilder = new OutputActionBuilder();
index d212eee886c592a6a1afe2bb695ce7bae09ba917..fd797bbb367b1dcf2a7bf63041bbbc12ee111edd 100644 (file)
@@ -19,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10SetDlDstActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetDlDstActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(final ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetDlDstCaseBuilder caseBuilder = new SetDlDstCaseBuilder();
         SetDlDstActionBuilder actionBuilder = new SetDlDstActionBuilder();
index 9ca56a90648274848b04aa663f64adfb7a238f43..e471881fac03ae8d4921c0c3a3f690fc96af230f 100644 (file)
@@ -19,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10SetDlSrcActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetDlSrcActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(final ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetDlSrcCaseBuilder caseBuilder = new SetDlSrcCaseBuilder();
         SetDlSrcActionBuilder actionBuilder = new SetDlSrcActionBuilder();
index 14ea5fcc616f2f21b1e4238ee1ddea8147dfe0f6..eb454ab81a5a94c6c6169892e78ea15a5e56870e 100644 (file)
@@ -18,14 +18,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10SetNwDstActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetNwDstActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(final ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetNwDstCaseBuilder caseBuilder = new SetNwDstCaseBuilder();
         SetNwDstActionBuilder actionBuilder = new SetNwDstActionBuilder();
index 9c982c21a98cdcd76c7b8d35bc5393d3ea25c8e2..972dfdb9ef6ab7193a5fc46b02b4e7ae732454b3 100644 (file)
@@ -18,14 +18,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10SetNwSrcActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetNwSrcActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(final ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetNwSrcCaseBuilder caseBuilder = new SetNwSrcCaseBuilder();
         SetNwSrcActionBuilder actionBuilder = new SetNwSrcActionBuilder();
index bec85f5086eefdce19c9460334db8b65b3c31769..6e0c0ac329d4e4e858d75d727b652f8e9a4d133d 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -19,14 +18,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10SetNwTosActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetNwTosActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetNwTosCaseBuilder caseBuilder = new SetNwTosCaseBuilder();
         SetNwTosActionBuilder tosBuilder = new SetNwTosActionBuilder();
index 39643a8864379fe3b274345dceefb0dd1fedeebb..65c2ac5083df8c39118650b97a3b7d46d088d088 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -20,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 
 /**
- * @author michal.polkorab
+ * OF10SetTpDstActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetTpDstActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetTpDstCaseBuilder caseBuilder = new SetTpDstCaseBuilder();
         SetTpDstActionBuilder actionBuilder = new SetTpDstActionBuilder();
index b07f69fc625e06f246d735275a8e49f2f54601ef..210016d73e7a22f2b2abd8ebf211c7138c45cf9a 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -20,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 
 /**
- * @author michal.polkorab
+ * OF10SetTpSrcActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetTpSrcActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetTpSrcCaseBuilder caseBuilder = new SetTpSrcCaseBuilder();
         SetTpSrcActionBuilder actionBuilder = new SetTpSrcActionBuilder();
index 5431f1bafef6002d1520b0fb30388a2026781c28..ed2e8c0bb732a69a8ef45a5afd70ed6ac34b0c27 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -19,14 +18,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10SetVlanPcpActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetVlanPcpActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder();
+        final org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+            .ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetVlanPcpCaseBuilder caseBuilder = new SetVlanPcpCaseBuilder();
         SetVlanPcpActionBuilder actionBuilder = new SetVlanPcpActionBuilder();
index 5bef7e195cf69d61737d9539523f6251638b82f0..3bf0810265206f14e1264c10a4c839c0f245bb2e 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -19,14 +18,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10SetVlanVidActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10SetVlanVidActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder();
+        final org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+            .ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetVlanVidCaseBuilder caseBuilder = new SetVlanVidCaseBuilder();
         SetVlanVidActionBuilder actionBuilder = new SetVlanVidActionBuilder();
index d7c94e9ff869c1edd770b0245edbc3ccce0d7de1..6ef46855ad55533018b6a49a83bbd87abc806758 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -18,14 +17,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF10StripVlanActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF10StripVlanActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         builder.setActionChoice(getType());
         input.skipBytes(ActionConstants.PADDING_IN_ACTION_HEADER);
index dbf2cc9ef4e7c1924a5fada8d1fd25167b379cc5..9eff6266ceecb3d1ce575b8cda5b1fcb46173efc 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -18,8 +17,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13CopyTtlInActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13CopyTtlInActionDeserializer extends AbstractActionDeserializer {
 
index a5997fcac298dd5df6f5e33564662f9935875837..2513932507ad767623b36b1ecc3461d3c1011bde 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -18,8 +17,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13CopyTtlOutActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13CopyTtlOutActionDeserializer extends AbstractActionDeserializer {
 
index 2f19396228880c15d983586185a3d428d2bcbbbb..7d192f473b70d312ee19ecc6b113173c4dab4bd4 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -18,8 +17,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13DecMplsTtlActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13DecMplsTtlActionDeserializer extends AbstractActionDeserializer {
 
index d2b9cf7c6de241325479225ae73d1d1f100b65c8..3cfe775cb335eb5267c794938d6938512cebacb9 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -18,8 +17,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13DecNwTtlActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13DecNwTtlActionDeserializer extends AbstractActionDeserializer {
 
index 15455bbc4b72580fe0c814bda0a79f62cfde01dd..9f9683882d7821505a2136f371398fac012c937b 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.GroupCaseBuilder;
@@ -18,14 +17,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13GroupActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13GroupActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder();
+        final org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+            .ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         GroupCaseBuilder caseBuilder = new GroupCaseBuilder();
         GroupActionBuilder actionBuilder = new GroupActionBuilder();
index 47f0c72aed0f04304010feacc63f73f5d43dda45..4f41f4b1359b3c28ee1a9c019acc99bb80cafe0b 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -20,14 +19,16 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber;
 
 /**
- * @author michal.polkorab
+ * OF13OutputActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13OutputActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder();
+        final org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+            .ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         OutputActionCaseBuilder caseBuilder = new OutputActionCaseBuilder();
         OutputActionBuilder actionBuilder = new OutputActionBuilder();
index 3ab74229b84dcd4b90d83a67ea0f43701e402a35..c414de406ea658fad1f116540ca875085ae48241 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -20,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
 
 /**
- * @author michal.polkorab
+ * OF13PopMplsActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13PopMplsActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         PopMplsCaseBuilder caseBuilder = new PopMplsCaseBuilder();
         PopMplsActionBuilder mplsBuilder = new PopMplsActionBuilder();
index d67923b7bb522de142c9b85220d2401bd52058de..6f22056bf808f21276bfe721133bcf747b284e0c 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -18,8 +17,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13PopPbbActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13PopPbbActionDeserializer extends AbstractActionDeserializer {
 
index 28ad4490681ba5ce617ebecce85a4a842bf5e6cf..59fe01aa630f7fac52b79f41e4b25844d81ef54b 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -18,8 +17,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13PopVlanActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13PopVlanActionDeserializer extends AbstractActionDeserializer {
 
index 9419181ff51c6df800ab99a32f4b9736ce163198..681f65ed78b6d612c131d08f9341623a1db0dfad 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -20,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
 
 /**
- * @author michal.polkorab
+ * OF13PushMplsActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13PushMplsActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         PushMplsCaseBuilder caseBuilder = new PushMplsCaseBuilder();
         PushMplsActionBuilder mplsBuilder = new PushMplsActionBuilder();
index 085bbd7bb08f26130ea60d628543bba497381c59..01ed3bf9affffa1733030cb37150edc3cb81bf8f 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -20,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
 
 /**
- * @author michal.polkorab
+ * OF13PushPbbActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13PushPbbActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         PushPbbCaseBuilder caseBuilder = new PushPbbCaseBuilder();
         PushPbbActionBuilder pbbBuilder = new PushPbbActionBuilder();
index d45356dd33910e56724850e4038826e75b95c67b..63792a5b97781f959694c154cbdc763ac9e82f72 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -20,14 +19,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
 
 /**
- * @author michal.polkorab
+ * OF13PushVlanActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13PushVlanActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         PushVlanCaseBuilder caseBuilder = new PushVlanCaseBuilder();
         PushVlanActionBuilder vlanBuilder = new PushVlanActionBuilder();
index 442f6d9416a6a71f880e3245315f2e1ee438dfd6..0c7ebf17f0fb85952590e9b13d6a810cd967165e 100644 (file)
@@ -9,10 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.ArrayList;
 import java.util.List;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
@@ -26,8 +24,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
 
 /**
- * @author michal.polkorab
+ * OF13SetFieldActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13SetFieldActionDeserializer extends AbstractActionDeserializer
         implements DeserializerRegistryInjector {
@@ -36,10 +35,11 @@ public class OF13SetFieldActionDeserializer extends AbstractActionDeserializer
 
     @Override
     public Action deserialize(ByteBuf input) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder builder = new ActionBuilder();
-        int startIndex = input.readerIndex();
+        final  org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
+            .ActionBuilder builder = new ActionBuilder();
+        final int startIndex = input.readerIndex();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
-        SetFieldCaseBuilder caseBuilder = new SetFieldCaseBuilder();
+        final SetFieldCaseBuilder caseBuilder = new SetFieldCaseBuilder();
         SetFieldActionBuilder actionBuilder = new SetFieldActionBuilder();
         int oxmClass = input.getUnsignedShort(input.readerIndex());
         // get oxm_field & hasMask byte and extract the field value
index 2f5abcb9ae330f26d58d99c1feed85086a18ae69..f833bd9cee35a1e274f99d44ae9ef10503ea4143 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -19,14 +18,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13SetMplsTtlActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13SetMplsTtlActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetMplsTtlCaseBuilder caseBuilder = new SetMplsTtlCaseBuilder();
         SetMplsTtlActionBuilder actionBuilder = new SetMplsTtlActionBuilder();
index 9d1bcaa71f5066886965ef659de60aa22fbf3c13..028be4d4bf3f36003a497c3026c37cade634dfe2 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
@@ -19,14 +18,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13SetNwTtlActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13SetNwTtlActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetNwTtlCaseBuilder caseBuilder = new SetNwTtlCaseBuilder();
         SetNwTtlActionBuilder actionBuilder = new SetNwTtlActionBuilder();
index 38d2b77d0e284061d0c0c814f306638feea121a4..797a2723b72ed41322a9396b1b82a94675a9d818 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetQueueCaseBuilder;
@@ -18,14 +17,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
 
 /**
- * @author michal.polkorab
+ * OF13SetQueueActionDeserializer.
  *
+ * @author michal.polkorab
  */
 public class OF13SetQueueActionDeserializer extends AbstractActionDeserializer {
 
     @Override
     public Action deserialize(ByteBuf input) {
-        ActionBuilder builder = new ActionBuilder();
+        final ActionBuilder builder = new ActionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         SetQueueCaseBuilder caseBuilder = new SetQueueCaseBuilder();
         SetQueueActionBuilder actionBuilder = new SetQueueActionBuilder();
index 2af6be440da4b0b6c14b6084d7a95646939a00e6..254a9ea79330c1393c16aee58aafdf8fdf07dc43 100644 (file)
@@ -18,7 +18,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * OF protocol versions: 1.0, 1.3, 1.4, 1.5.
  * @author giuseppex.petralia@intel.com
  */
-public class BarrierInputMessageFactory extends VersionAssignableFactory implements OFDeserializer<BarrierInput>{
+public class BarrierInputMessageFactory extends VersionAssignableFactory implements OFDeserializer<BarrierInput> {
 
     @Override
     public BarrierInput deserialize(ByteBuf rawMessage) {
index a765a2d3f15434fb71908e95b24d8fedb4f622d7..ef253977cafede7fc8277ecc2070439a9702dff2 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * @author michal.polkorab
  * @author timotej.kubas
  */
-public class EchoRequestMessageFactory extends VersionAssignableFactory implements OFDeserializer<EchoRequestMessage>{
+public class EchoRequestMessageFactory extends VersionAssignableFactory implements OFDeserializer<EchoRequestMessage> {
 
     @Override
     public EchoRequestMessage deserialize(ByteBuf rawMessage) {
index b11da58c36f321eb2063f6e4c49d9dbc0beb4ae4..80a876def4d5f5ab5b6eabca4db7226416ef7c5c 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
@@ -34,7 +33,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessageBuilder;
 
 /**
- * Translates Error messages
+ * Translates Error messages.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
@@ -87,149 +87,149 @@ public class ErrorMessageFactory implements OFDeserializer<ErrorMessage>,
         int code = rawMessage.readUnsignedShort();
         if (type != null) {
             switch (type) {
-            case HELLOFAILED:
-            {
-                HelloFailedCode errorCode = HelloFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case HELLOFAILED:
+                {
+                    HelloFailedCode errorCode = HelloFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case BADREQUEST:
-            {
-                BadRequestCode errorCode = BadRequestCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case BADREQUEST:
+                {
+                    BadRequestCode errorCode = BadRequestCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case BADACTION:
-            {
-                BadActionCode errorCode = BadActionCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case BADACTION:
+                {
+                    BadActionCode errorCode = BadActionCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case BADINSTRUCTION:
-            {
-                BadInstructionCode errorCode = BadInstructionCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case BADINSTRUCTION:
+                {
+                    BadInstructionCode errorCode = BadInstructionCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case BADMATCH:
-            {
-                BadMatchCode errorCode = BadMatchCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case BADMATCH:
+                {
+                    BadMatchCode errorCode = BadMatchCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case FLOWMODFAILED:
-            {
-                FlowModFailedCode errorCode = FlowModFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case FLOWMODFAILED:
+                {
+                    FlowModFailedCode errorCode = FlowModFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case GROUPMODFAILED:
-            {
-                GroupModFailedCode errorCode = GroupModFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case GROUPMODFAILED:
+                {
+                    GroupModFailedCode errorCode = GroupModFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case PORTMODFAILED:
-            {
-                PortModFailedCode errorCode = PortModFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case PORTMODFAILED:
+                {
+                    PortModFailedCode errorCode = PortModFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case TABLEMODFAILED:
-            {
-                TableModFailedCode errorCode = TableModFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case TABLEMODFAILED:
+                {
+                    TableModFailedCode errorCode = TableModFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case QUEUEOPFAILED:
-            {
-                QueueOpFailedCode errorCode = QueueOpFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case QUEUEOPFAILED:
+                {
+                    QueueOpFailedCode errorCode = QueueOpFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case SWITCHCONFIGFAILED:
-            {
-                SwitchConfigFailedCode errorCode = SwitchConfigFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case SWITCHCONFIGFAILED:
+                {
+                    SwitchConfigFailedCode errorCode = SwitchConfigFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case ROLEREQUESTFAILED:
-            {
-                RoleRequestFailedCode errorCode = RoleRequestFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case ROLEREQUESTFAILED:
+                {
+                    RoleRequestFailedCode errorCode = RoleRequestFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case METERMODFAILED:
-            {
-                MeterModFailedCode errorCode = MeterModFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case METERMODFAILED:
+                {
+                    MeterModFailedCode errorCode = MeterModFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case TABLEFEATURESFAILED:
-            {
-                TableFeaturesFailedCode errorCode = TableFeaturesFailedCode.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case TABLEFEATURESFAILED:
+                {
+                    TableFeaturesFailedCode errorCode = TableFeaturesFailedCode.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            default:
-                setUnknownCode(builder, code);
-                break;
+                default:
+                    setUnknownCode(builder, code);
+                    break;
             }
         } else {
             setUnknownCode(builder, code);
index 244b4bfa1a3a6f2d18cc6ecc7f7a0230fcb25718..a5d854b929ef88d95273e954c62077c30da500f9 100644 (file)
@@ -20,8 +20,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice;
 
 /**
- * @author michal.polkorab
+ * Implementation of OFDeserializer for ExperimenterMessages.
  *
+ * @author michal.polkorab
  */
 public class ExperimenterMessageFactory implements OFDeserializer<ExperimenterMessage>,
         DeserializerRegistryInjector {
@@ -49,7 +50,7 @@ public class ExperimenterMessageFactory implements OFDeserializer<ExperimenterMe
     }
 
     @Override
-    public void injectDeserializerRegistry(DeserializerRegistry deserializerRegistry) {
-        this.deserializerRegistry = deserializerRegistry;
+    public void injectDeserializerRegistry(DeserializerRegistry registry) {
+        this.deserializerRegistry = registry;
     }
-}
\ No newline at end of file
+}
index b599c208dfb0c21db5d471d059dfd504ebac6abd..0fbe33d8b3bfa36f06d9376334659a35848e2e7f 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.math.BigInteger;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Capabilities;
@@ -19,11 +17,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutputBuilder;
 
 /**
- * Translates FeaturesReply messages
+ * Translates FeaturesReply messages.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
-public class FeaturesReplyMessageFactory implements OFDeserializer<GetFeaturesOutput>{
+public class FeaturesReplyMessageFactory implements OFDeserializer<GetFeaturesOutput> {
 
     private static final byte PADDING_IN_FEATURES_REPLY_HEADER = 2;
 
@@ -45,13 +44,13 @@ public class FeaturesReplyMessageFactory implements OFDeserializer<GetFeaturesOu
     }
 
     private static Capabilities createCapabilities(long input) {
-        final Boolean flowStats = (input & (1 << 0)) != 0;
-        final Boolean tableStats = (input & (1 << 1)) != 0;
-        final Boolean portStats = (input & (1 << 2)) != 0;
-        final Boolean groupStats = (input & (1 << 3)) != 0;
-        final Boolean ipReasm = (input & (1 << 5)) != 0;
-        final Boolean queueStats = (input & (1 << 6)) != 0;
-        final Boolean portBlocked = (input & (1 << 8)) != 0;
+        final Boolean flowStats = (input & 1 << 0) != 0;
+        final Boolean tableStats = (input & 1 << 1) != 0;
+        final Boolean portStats = (input & 1 << 2) != 0;
+        final Boolean groupStats = (input & 1 << 3) != 0;
+        final Boolean ipReasm = (input & 1 << 5) != 0;
+        final Boolean queueStats = (input & 1 << 6) != 0;
+        final Boolean portBlocked = (input & 1 << 8) != 0;
         return new Capabilities(flowStats, groupStats, ipReasm,
                 portBlocked, portStats, queueStats, tableStats);
     }
index 1531c8ebf0c929c2a817a3b6bc82662a27e677a6..966b30ace8317b8794bbf2c142412cac9a3a0c77 100644 (file)
@@ -28,7 +28,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInputBuilder;
 
 /**
- * Translates FlowModInput messages
+ * Translates FlowModInput messages.
  */
 public class FlowModInputMessageFactory implements OFDeserializer<FlowModInput>, DeserializerRegistryInjector {
 
@@ -43,9 +43,9 @@ public class FlowModInputMessageFactory implements OFDeserializer<FlowModInput>,
         byte[] cookie = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         rawMessage.readBytes(cookie);
         builder.setCookie(new BigInteger(1, cookie));
-        byte[] cookie_mask = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
-        rawMessage.readBytes(cookie_mask);
-        builder.setCookieMask(new BigInteger(1, cookie_mask));
+        final byte[] cookieMask = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+        rawMessage.readBytes(cookieMask);
+        builder.setCookieMask(new BigInteger(1, cookieMask));
         builder.setTableId(new TableId((long) rawMessage.readUnsignedByte()));
         builder.setCommand(FlowModCommand.forValue(rawMessage.readUnsignedByte()));
         builder.setIdleTimeout(rawMessage.readUnsignedShort());
@@ -66,12 +66,13 @@ public class FlowModInputMessageFactory implements OFDeserializer<FlowModInput>,
         return builder.build();
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static FlowModFlags createFlowModFlagsFromBitmap(int input) {
-        final Boolean _oFPFFSENDFLOWREM = (input & (1 << 0)) > 0;
-        final Boolean _oFPFFCHECKOVERLAP = (input & (1 << 1)) > 0;
-        final Boolean _oFPFFRESETCOUNTS = (input & (1 << 2)) > 0;
-        final Boolean _oFPFFNOPKTCOUNTS = (input & (1 << 3)) > 0;
-        final Boolean _oFPFFNOBYTCOUNTS = (input & (1 << 4)) > 0;
+        final Boolean _oFPFFSENDFLOWREM = (input & 1 << 0) > 0;
+        final Boolean _oFPFFCHECKOVERLAP = (input & 1 << 1) > 0;
+        final Boolean _oFPFFRESETCOUNTS = (input & 1 << 2) > 0;
+        final Boolean _oFPFFNOPKTCOUNTS = (input & 1 << 3) > 0;
+        final Boolean _oFPFFNOBYTCOUNTS = (input & 1 << 4) > 0;
         return new FlowModFlags(_oFPFFCHECKOVERLAP, _oFPFFNOBYTCOUNTS, _oFPFFNOPKTCOUNTS, _oFPFFRESETCOUNTS,
                 _oFPFFSENDFLOWREM);
     }
@@ -80,4 +81,4 @@ public class FlowModInputMessageFactory implements OFDeserializer<FlowModInput>,
     public void injectDeserializerRegistry(DeserializerRegistry deserializerRegistry) {
         registry = deserializerRegistry;
     }
-}
\ No newline at end of file
+}
index 05ababb3dd6cd1dca0696eb3e0991c21c44f3306..f736b8597a059a10f63cb4f1fbd5747ab33e8508 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.math.BigInteger;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
@@ -24,7 +22,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessageBuilder;
 
 /**
- * Translates FlowRemoved messages
+ * Translates FlowRemoved messages.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
index 39d757cc784fdbbcbb304406dee605cb3620dda5..0e124962b3b94aea37d0b012f990162aa84c11f0 100644 (file)
@@ -9,10 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.ArrayList;
 import java.util.List;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowRemovedReason;
@@ -28,7 +26,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMaskBuilder;
 
 /**
- * Translates GetAsyncReply messages
+ * Translates GetAsyncReply messages.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
@@ -82,13 +81,13 @@ public class GetAsyncReplyMessageFactory implements OFDeserializer<GetAsyncOutpu
 
     private static List<PacketInReason> decodePacketInReasons(long input) {
         List<PacketInReason> reasons = new ArrayList<>();
-        if ((input & (1 << 0)) != 0) {
+        if ((input & 1 << 0) != 0) {
             reasons.add(PacketInReason.OFPRNOMATCH);
         }
-        if ((input & (1 << 1)) != 0) {
+        if ((input & 1 << 1) != 0) {
             reasons.add(PacketInReason.OFPRACTION);
         }
-        if ((input & (1 << 2)) != 0) {
+        if ((input & 1 << 2) != 0) {
             reasons.add(PacketInReason.OFPRINVALIDTTL);
         }
         return reasons;
@@ -96,13 +95,13 @@ public class GetAsyncReplyMessageFactory implements OFDeserializer<GetAsyncOutpu
 
     private static List<PortReason> decodePortReasons(long input) {
         List<PortReason> reasons = new ArrayList<>();
-        if ((input & (1 << 0)) != 0) {
+        if ((input & 1 << 0) != 0) {
             reasons.add(PortReason.OFPPRADD);
         }
-        if ((input & (1 << 1)) != 0) {
+        if ((input & 1 << 1) != 0) {
             reasons.add(PortReason.OFPPRDELETE);
         }
-        if ((input & (1 << 2)) != 0) {
+        if ((input & 1 << 2) != 0) {
             reasons.add(PortReason.OFPPRMODIFY);
         }
         return reasons;
@@ -110,16 +109,16 @@ public class GetAsyncReplyMessageFactory implements OFDeserializer<GetAsyncOutpu
 
     private static List<FlowRemovedReason> decodeFlowRemovedReasons(long input) {
         List<FlowRemovedReason> reasons = new ArrayList<>();
-        if ((input & (1 << 0)) != 0) {
+        if ((input & 1 << 0) != 0) {
             reasons.add(FlowRemovedReason.OFPRRIDLETIMEOUT);
         }
-        if ((input & (1 << 1)) != 0) {
+        if ((input & 1 << 1) != 0) {
             reasons.add(FlowRemovedReason.OFPRRHARDTIMEOUT);
         }
-        if ((input & (1 << 2)) != 0) {
+        if ((input & 1 << 2) != 0) {
             reasons.add(FlowRemovedReason.OFPRRDELETE);
         }
-        if ((input & (1 << 3)) != 0) {
+        if ((input & 1 << 3) != 0) {
             reasons.add(FlowRemovedReason.OFPRRGROUPDELETE);
         }
         return reasons;
index 6a3485ec183452371e2b36007f277952e6f8920a..db8837be23aa715e35ec146d2d46c37edbc9e35d 100644 (file)
@@ -14,8 +14,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetAsyncInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates GetAsyncRequest messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class GetAsyncRequestMessageFactory implements OFDeserializer<GetAsyncInput> {
 
@@ -23,7 +24,7 @@ public class GetAsyncRequestMessageFactory implements OFDeserializer<GetAsyncInp
     public GetAsyncInput deserialize(ByteBuf rawMessage) {
         GetAsyncInputBuilder builder = new GetAsyncInputBuilder();
         builder.setVersion((short) EncodeConstants.OF13_VERSION_ID);
-        builder.setXid((rawMessage.readUnsignedInt()));
+        builder.setXid(rawMessage.readUnsignedInt());
         return builder.build();
     }
 }
index 8b63dac5472d54dacbeaa5abcf96df1825489a42..2f2511b4fc28e396fc3b55b25e7acbe0b056fc10 100644 (file)
@@ -15,8 +15,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates GetQueueConfigInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class GetQueueConfigInputMessageFactory implements OFDeserializer<GetQueueConfigInput> {
 
@@ -24,7 +25,7 @@ public class GetQueueConfigInputMessageFactory implements OFDeserializer<GetQueu
     public GetQueueConfigInput deserialize(ByteBuf rawMessage) {
         GetQueueConfigInputBuilder builder = new GetQueueConfigInputBuilder();
         builder.setVersion((short) EncodeConstants.OF13_VERSION_ID);
-        builder.setXid((rawMessage.readUnsignedInt()));
+        builder.setXid(rawMessage.readUnsignedInt());
         builder.setPort(new PortNumber(rawMessage.readUnsignedInt()));
         return builder.build();
     }
index 5d7de02b1a221399f85978d51dfc8c3207ff7af3..74689cef6f1b2335a5783766d0fb4c876a290844 100644 (file)
@@ -28,8 +28,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.grouping.BucketsListBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates GroupModInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class GroupModInputMessageFactory implements OFDeserializer<GroupModInput>, DeserializerRegistryInjector {
 
@@ -55,7 +56,7 @@ public class GroupModInputMessageFactory implements OFDeserializer<GroupModInput
         List<BucketsList> bucketsList = new ArrayList<>();
         while (rawMessage.readableBytes() > 0) {
             BucketsListBuilder bucketsBuilder = new BucketsListBuilder();
-            int bucketsLength = rawMessage.readUnsignedShort();
+            final int bucketsLength = rawMessage.readUnsignedShort();
             bucketsBuilder.setWeight(rawMessage.readUnsignedShort());
             bucketsBuilder.setWatchPort(new PortNumber(rawMessage.readUnsignedInt()));
             bucketsBuilder.setWatchGroup(rawMessage.readUnsignedInt());
index 50cf33c1c3a2a11ef102b738b256890d8e387ed3..7ee348353607fc1cf5ccf2ccf68c7f505e4b64f6 100644 (file)
@@ -21,8 +21,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.hello.ElementsBuilder;
 
 /**
- * Translates Hello messages.
- * OF protocol versions: 1.3, 1.4, 1.5.
+ * Translates Hello messages. OF protocol versions: 1.3, 1.4, 1.5.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
@@ -66,12 +66,11 @@ public class HelloMessageFactory extends VersionAssignableFactory implements OFD
         return elementsList;
     }
 
-    private static List<Boolean> readVersionBitmap(int[] input){
+    private static List<Boolean> readVersionBitmap(int[] input) {
         List<Boolean> versionBitmapList = new ArrayList<>();
-        for (int i = 0; i < input.length; i++) {
-            int mask = input[i];
+        for (int mask : input) {
             for (int j = 0; j < Integer.SIZE; j++) {
-                    versionBitmapList.add((mask & (1 << j)) != 0);
+                versionBitmapList.add((mask & 1 << j) != 0);
             }
         }
         return versionBitmapList;
index 0196b4b42a412c3ac38347c32168c76ba1016100..568b9aaecdb22d147deb22ffce20fc1a556264ed 100644 (file)
@@ -30,8 +30,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.mod.BandsBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates MeterModInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MeterModInputMessageFactory implements OFDeserializer<MeterModInput>, DeserializerRegistryInjector {
 
@@ -58,38 +59,41 @@ public class MeterModInputMessageFactory implements OFDeserializer<MeterModInput
             int bandStartIndex = rawMessage.readerIndex();
             int bandType = rawMessage.readUnsignedShort();
             switch (bandType) {
-            case 1:
-                MeterBandDropCaseBuilder bandDropCaseBuilder = new MeterBandDropCaseBuilder();
-                MeterBandDropBuilder bandDropBuilder = new MeterBandDropBuilder();
-                bandDropBuilder.setType(MeterBandType.forValue(bandType));
-                rawMessage.readUnsignedShort();
-                bandDropBuilder.setRate(rawMessage.readUnsignedInt());
-                bandDropBuilder.setBurstSize(rawMessage.readUnsignedInt());
-                rawMessage.skipBytes(PADDING_IN_METER_BAND_DROP_HEADER);
-                bandDropCaseBuilder.setMeterBandDrop(bandDropBuilder.build());
-                bandsBuilder.setMeterBand(bandDropCaseBuilder.build());
-                break;
-            case 2:
-                MeterBandDscpRemarkCaseBuilder bandDscpRemarkCaseBuilder = new MeterBandDscpRemarkCaseBuilder();
-                MeterBandDscpRemarkBuilder bandDscpRemarkBuilder = new MeterBandDscpRemarkBuilder();
-                bandDscpRemarkBuilder.setType(MeterBandType.forValue(bandType));
-                rawMessage.readUnsignedShort();
-                bandDscpRemarkBuilder.setRate(rawMessage.readUnsignedInt());
-                bandDscpRemarkBuilder.setBurstSize(rawMessage.readUnsignedInt());
-                bandDscpRemarkBuilder.setPrecLevel(rawMessage.readUnsignedByte());
-                rawMessage.skipBytes(PADDING_IN_METER_BAND_DSCP_HEADER);
-                bandDscpRemarkCaseBuilder.setMeterBandDscpRemark(bandDscpRemarkBuilder.build());
-                bandsBuilder.setMeterBand(bandDscpRemarkCaseBuilder.build());
-                break;
-            case 0xFFFF:
-                long expId = rawMessage
-                        .getUnsignedInt(rawMessage.readerIndex() + 2 * EncodeConstants.SIZE_OF_INT_IN_BYTES);
-                rawMessage.readerIndex(bandStartIndex);
-                OFDeserializer<MeterBandExperimenterCase> deserializer = registry
-                        .getDeserializer(ExperimenterDeserializerKeyFactory
-                                .createMeterBandDeserializerKey(EncodeConstants.OF13_VERSION_ID, expId));
-                bandsBuilder.setMeterBand(deserializer.deserialize(rawMessage));
-                break;
+                case 1:
+                    final MeterBandDropCaseBuilder bandDropCaseBuilder = new MeterBandDropCaseBuilder();
+                    MeterBandDropBuilder bandDropBuilder = new MeterBandDropBuilder();
+                    bandDropBuilder.setType(MeterBandType.forValue(bandType));
+                    rawMessage.readUnsignedShort();
+                    bandDropBuilder.setRate(rawMessage.readUnsignedInt());
+                    bandDropBuilder.setBurstSize(rawMessage.readUnsignedInt());
+                    rawMessage.skipBytes(PADDING_IN_METER_BAND_DROP_HEADER);
+                    bandDropCaseBuilder.setMeterBandDrop(bandDropBuilder.build());
+                    bandsBuilder.setMeterBand(bandDropCaseBuilder.build());
+                    break;
+                case 2:
+                    final MeterBandDscpRemarkCaseBuilder bandDscpRemarkCaseBuilder =
+                        new MeterBandDscpRemarkCaseBuilder();
+                    MeterBandDscpRemarkBuilder bandDscpRemarkBuilder = new MeterBandDscpRemarkBuilder();
+                    bandDscpRemarkBuilder.setType(MeterBandType.forValue(bandType));
+                    rawMessage.readUnsignedShort();
+                    bandDscpRemarkBuilder.setRate(rawMessage.readUnsignedInt());
+                    bandDscpRemarkBuilder.setBurstSize(rawMessage.readUnsignedInt());
+                    bandDscpRemarkBuilder.setPrecLevel(rawMessage.readUnsignedByte());
+                    rawMessage.skipBytes(PADDING_IN_METER_BAND_DSCP_HEADER);
+                    bandDscpRemarkCaseBuilder.setMeterBandDscpRemark(bandDscpRemarkBuilder.build());
+                    bandsBuilder.setMeterBand(bandDscpRemarkCaseBuilder.build());
+                    break;
+                case 0xFFFF:
+                    long expId = rawMessage.getUnsignedInt(rawMessage.readerIndex()
+                            + 2 * EncodeConstants.SIZE_OF_INT_IN_BYTES);
+                    rawMessage.readerIndex(bandStartIndex);
+                    OFDeserializer<MeterBandExperimenterCase> deserializer = registry
+                            .getDeserializer(ExperimenterDeserializerKeyFactory
+                                    .createMeterBandDeserializerKey(EncodeConstants.OF13_VERSION_ID, expId));
+                    bandsBuilder.setMeterBand(deserializer.deserialize(rawMessage));
+                    break;
+                default:
+                    break;
             }
             bandsList.add(bandsBuilder.build());
         }
@@ -97,11 +101,12 @@ public class MeterModInputMessageFactory implements OFDeserializer<MeterModInput
         return builder.build();
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static MeterFlags createMeterFlags(int input) {
-        final Boolean mfKBPS = (input & (1 << 0)) != 0;
-        final Boolean mfPKTPS = (input & (1 << 1)) != 0;
-        final Boolean mfBURST = (input & (1 << 2)) != 0;
-        final Boolean mfSTATS = (input & (1 << 3)) != 0;
+        final Boolean mfKBPS = (input & 1 << 0) != 0;
+        final Boolean mfPKTPS = (input & 1 << 1) != 0;
+        final Boolean mfBURST = (input & 1 << 2) != 0;
+        final Boolean mfSTATS = (input & 1 << 3) != 0;
         return new MeterFlags(mfBURST, mfKBPS, mfPKTPS, mfSTATS);
     }
 
index 62ebf38f00c11a5e57060f0f1654243bb8e94d22..73d4e839c1b6282fa8a10c2417b8a39e2ce19cec 100644 (file)
@@ -140,7 +140,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeaturePropertiesBuilder;
 
 /**
- * Translates MultipartReply messages
+ * Translates MultipartReply messages.
  *
  * @author timotej.kubas
  * @author michal.polkorab
@@ -244,7 +244,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
     }
 
     private static MultipartReplyDescCase setDesc(final ByteBuf input) {
-        MultipartReplyDescCaseBuilder caseBuilder = new MultipartReplyDescCaseBuilder();
+        final MultipartReplyDescCaseBuilder caseBuilder = new MultipartReplyDescCaseBuilder();
         MultipartReplyDescBuilder descBuilder = new MultipartReplyDescBuilder();
         byte[] mfrDescBytes = new byte[DESC_STR_LEN];
         input.readBytes(mfrDescBytes);
@@ -311,17 +311,18 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         return caseBuilder.build();
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static FlowModFlags createFlowModFlagsFromBitmap(final int input) {
-        final Boolean fmfSENDFLOWREM = (input & (1 << 0)) != 0;
-        final Boolean fmfCHECKOVERLAP = (input & (1 << 1)) != 0;
-        final Boolean fmfRESETCOUNTS = (input & (1 << 2)) != 0;
-        final Boolean fmfNOPKTCOUNTS = (input & (1 << 3)) != 0;
-        final Boolean fmfNOBYTCOUNTS = (input & (1 << 4)) != 0;
+        final Boolean fmfSENDFLOWREM = (input & 1 << 0) != 0;
+        final Boolean fmfCHECKOVERLAP = (input & 1 << 1) != 0;
+        final Boolean fmfRESETCOUNTS = (input & 1 << 2) != 0;
+        final Boolean fmfNOPKTCOUNTS = (input & 1 << 3) != 0;
+        final Boolean fmfNOBYTCOUNTS = (input & 1 << 4) != 0;
         return new FlowModFlags(fmfCHECKOVERLAP, fmfNOBYTCOUNTS, fmfNOPKTCOUNTS, fmfRESETCOUNTS, fmfSENDFLOWREM);
     }
 
     private static MultipartReplyAggregateCase setAggregate(final ByteBuf input) {
-        MultipartReplyAggregateCaseBuilder caseBuilder = new MultipartReplyAggregateCaseBuilder();
+        final MultipartReplyAggregateCaseBuilder caseBuilder = new MultipartReplyAggregateCaseBuilder();
         MultipartReplyAggregateBuilder builder = new MultipartReplyAggregateBuilder();
         byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         input.readBytes(packetCount);
@@ -363,7 +364,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         List<TableFeatures> features = new ArrayList<>();
         while (input.readableBytes() > 0) {
             TableFeaturesBuilder featuresBuilder = new TableFeaturesBuilder();
-            int length = input.readUnsignedShort();
+            final int length = input.readUnsignedShort();
             featuresBuilder.setTableId(input.readUnsignedByte());
             input.skipBytes(PADDING_IN_MULTIPART_REPLY_TABLE_FEATURES);
             featuresBuilder.setName(ByteBufUtils.decodeNullTerminatedString(input, MAX_TABLE_NAME_LENGTH));
@@ -402,7 +403,8 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             tableFeaturesLength -= propertyLength;
             if (type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONS)
                     || type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS)) {
-                InstructionRelatedTableFeaturePropertyBuilder insBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
+                InstructionRelatedTableFeaturePropertyBuilder insBuilder =
+                        new InstructionRelatedTableFeaturePropertyBuilder();
                 CodeKeyMaker keyMaker = CodeKeyMakerFactory.createInstructionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
                 List<Instruction> instructions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
                         propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
@@ -411,7 +413,8 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             } else if (type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLES)
                     || type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS)) {
                 propertyLength -= COMMON_PROPERTY_LENGTH;
-                NextTableRelatedTableFeaturePropertyBuilder tableBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
+                NextTableRelatedTableFeaturePropertyBuilder tableBuilder =
+                        new NextTableRelatedTableFeaturePropertyBuilder();
                 List<NextTableIds> ids = new ArrayList<>();
                 while (propertyLength > 0) {
                     NextTableIdsBuilder nextTableIdsBuilder = new NextTableIdsBuilder();
@@ -549,7 +552,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         List<GroupStats> groupStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             GroupStatsBuilder groupStatsBuilder = new GroupStatsBuilder();
-            int bodyLength = input.readUnsignedShort();
+            final int bodyLength = input.readUnsignedShort();
             input.skipBytes(PADDING_IN_GROUP_HEADER_01);
             groupStatsBuilder.setGroupId(new GroupId(input.readUnsignedInt()));
             groupStatsBuilder.setRefCount(input.readUnsignedInt());
@@ -584,7 +587,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
     }
 
     private static MultipartReplyMeterFeaturesCase setMeterFeatures(final ByteBuf input) {
-        MultipartReplyMeterFeaturesCaseBuilder caseBuilder = new MultipartReplyMeterFeaturesCaseBuilder();
+        final MultipartReplyMeterFeaturesCaseBuilder caseBuilder = new MultipartReplyMeterFeaturesCaseBuilder();
         MultipartReplyMeterFeaturesBuilder builder = new MultipartReplyMeterFeaturesBuilder();
         builder.setMaxMeter(input.readUnsignedInt());
         builder.setBandTypes(createMeterBandsBitmap(input.readUnsignedInt()));
@@ -596,17 +599,19 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         return caseBuilder.build();
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static MeterFlags createMeterFlags(final long input) {
-        final Boolean mfKBPS = (input & (1 << 0)) != 0;
-        final Boolean mfPKTPS = (input & (1 << 1)) != 0;
-        final Boolean mfBURST = (input & (1 << 2)) != 0;
-        final Boolean mfSTATS = (input & (1 << 3)) != 0;
+        final Boolean mfKBPS = (input & 1 << 0) != 0;
+        final Boolean mfPKTPS = (input & 1 << 1) != 0;
+        final Boolean mfBURST = (input & 1 << 2) != 0;
+        final Boolean mfSTATS = (input & 1 << 3) != 0;
         return new MeterFlags(mfBURST, mfKBPS, mfPKTPS, mfSTATS);
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static MeterBandTypeBitmap createMeterBandsBitmap(final long input) {
-        final Boolean mbtDROP = (input & (1 << 1)) != 0;
-        final Boolean mbtDSCPREMARK = (input & (1 << 2)) != 0;
+        final Boolean mbtDROP = (input & 1 << 1) != 0;
+        final Boolean mbtDSCPREMARK = (input & 1 << 2) != 0;
         return new MeterBandTypeBitmap(mbtDROP, mbtDSCPREMARK);
     }
 
@@ -617,7 +622,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         while (input.readableBytes() > 0) {
             MeterStatsBuilder meterStatsBuilder = new MeterStatsBuilder();
             meterStatsBuilder.setMeterId(new MeterId(input.readUnsignedInt()));
-            int meterStatsBodyLength = input.readUnsignedShort();
+            final int meterStatsBodyLength = input.readUnsignedShort();
             input.skipBytes(PADDING_IN_METER_STATS_HEADER);
             meterStatsBuilder.setFlowCount(input.readUnsignedInt());
             byte[] packetInCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
@@ -666,7 +671,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                 int bandType = input.readUnsignedShort();
                 switch (bandType) {
                     case 1:
-                        MeterBandDropCaseBuilder bandDropCaseBuilder = new MeterBandDropCaseBuilder();
+                        final MeterBandDropCaseBuilder bandDropCaseBuilder = new MeterBandDropCaseBuilder();
                         MeterBandDropBuilder bandDropBuilder = new MeterBandDropBuilder();
                         bandDropBuilder.setType(MeterBandType.forValue(bandType));
                         actualLength += input.readUnsignedShort();
@@ -677,7 +682,8 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                         bandsBuilder.setMeterBand(bandDropCaseBuilder.build());
                         break;
                     case 2:
-                        MeterBandDscpRemarkCaseBuilder bandDscpRemarkCaseBuilder = new MeterBandDscpRemarkCaseBuilder();
+                        final MeterBandDscpRemarkCaseBuilder bandDscpRemarkCaseBuilder =
+                            new MeterBandDscpRemarkCaseBuilder();
                         MeterBandDscpRemarkBuilder bandDscpRemarkBuilder = new MeterBandDscpRemarkBuilder();
                         bandDscpRemarkBuilder.setType(MeterBandType.forValue(bandType));
                         actualLength += input.readUnsignedShort();
@@ -690,7 +696,8 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                         break;
                     case 0xFFFF:
                         actualLength += input.readUnsignedShort();
-                        long expId = input.getUnsignedInt(input.readerIndex() + 2 * EncodeConstants.SIZE_OF_INT_IN_BYTES);
+                        final long expId = input.getUnsignedInt(input.readerIndex()
+                                + 2 * EncodeConstants.SIZE_OF_INT_IN_BYTES);
                         input.readerIndex(bandStartIndex);
                         OFDeserializer<MeterBandExperimenterCase> deserializer = registry.getDeserializer(
                                 ExperimenterDeserializerKeyFactory.createMeterBandDeserializerKey(
@@ -722,8 +729,8 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                 .setExperimenter(new ExperimenterId(expId))
                 .setExpType(expType)
                 .setExperimenterDataOfChoice(deserializer.deserialize(input));
-        final MultipartReplyExperimenterCaseBuilder mpReplyExperimenterCaseBld = new MultipartReplyExperimenterCaseBuilder()
-                .setMultipartReplyExperimenter(mpExperimenterBld.build());
+        final MultipartReplyExperimenterCaseBuilder mpReplyExperimenterCaseBld =
+                new MultipartReplyExperimenterCaseBuilder().setMultipartReplyExperimenter(mpExperimenterBld.build());
         return mpReplyExperimenterCaseBld.build();
     }
 
@@ -754,43 +761,43 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
     }
 
     private static PortConfig createPortConfig(final long input) {
-        final Boolean pcPortDown = ((input) & (1 << 0)) != 0;
-        final Boolean pcNRecv = ((input) & (1 << 2)) != 0;
-        final Boolean pcNFwd = ((input) & (1 << 5)) != 0;
-        final Boolean pcNPacketIn = ((input) & (1 << 6)) != 0;
+        final Boolean pcPortDown = (input & 1 << 0) != 0;
+        final Boolean pcNRecv = (input & 1 << 2) != 0;
+        final Boolean pcNFwd = (input & 1 << 5) != 0;
+        final Boolean pcNPacketIn = (input & 1 << 6) != 0;
         return new PortConfig(pcNFwd, pcNPacketIn, pcNRecv, pcPortDown);
     }
 
     private static PortState createPortState(final long input) {
-        final Boolean psLinkDown = ((input) & (1 << 0)) != 0;
-        final Boolean psBlocked = ((input) & (1 << 1)) != 0;
-        final Boolean psLive = ((input) & (1 << 2)) != 0;
+        final Boolean psLinkDown = (input & 1 << 0) != 0;
+        final Boolean psBlocked = (input & 1 << 1) != 0;
+        final Boolean psLive = (input & 1 << 2) != 0;
         return new PortState(psBlocked, psLinkDown, psLive);
     }
 
     private static PortFeatures createPortFeatures(final long input) {
-        final Boolean pf10mbHd = ((input) & (1 << 0)) != 0;
-        final Boolean pf10mbFd = ((input) & (1 << 1)) != 0;
-        final Boolean pf100mbHd = ((input) & (1 << 2)) != 0;
-        final Boolean pf100mbFd = ((input) & (1 << 3)) != 0;
-        final Boolean pf1gbHd = ((input) & (1 << 4)) != 0;
-        final Boolean pf1gbFd = ((input) & (1 << 5)) != 0;
-        final Boolean pf10gbFd = ((input) & (1 << 6)) != 0;
-        final Boolean pf40gbFd = ((input) & (1 << 7)) != 0;
-        final Boolean pf100gbFd = ((input) & (1 << 8)) != 0;
-        final Boolean pf1tbFd = ((input) & (1 << 9)) != 0;
-        final Boolean pfOther = ((input) & (1 << 10)) != 0;
-        final Boolean pfCopper = ((input) & (1 << 11)) != 0;
-        final Boolean pfFiber = ((input) & (1 << 12)) != 0;
-        final Boolean pfAutoneg = ((input) & (1 << 13)) != 0;
-        final Boolean pfPause = ((input) & (1 << 14)) != 0;
-        final Boolean pfPauseAsym = ((input) & (1 << 15)) != 0;
+        final Boolean pf10mbHd = (input & 1 << 0) != 0;
+        final Boolean pf10mbFd = (input & 1 << 1) != 0;
+        final Boolean pf100mbHd = (input & 1 << 2) != 0;
+        final Boolean pf100mbFd = (input & 1 << 3) != 0;
+        final Boolean pf1gbHd = (input & 1 << 4) != 0;
+        final Boolean pf1gbFd = (input & 1 << 5) != 0;
+        final Boolean pf10gbFd = (input & 1 << 6) != 0;
+        final Boolean pf40gbFd = (input & 1 << 7) != 0;
+        final Boolean pf100gbFd = (input & 1 << 8) != 0;
+        final Boolean pf1tbFd = (input & 1 << 9) != 0;
+        final Boolean pfOther = (input & 1 << 10) != 0;
+        final Boolean pfCopper = (input & 1 << 11) != 0;
+        final Boolean pfFiber = (input & 1 << 12) != 0;
+        final Boolean pfAutoneg = (input & 1 << 13) != 0;
+        final Boolean pfPause = (input & 1 << 14) != 0;
+        final Boolean pfPauseAsym = (input & 1 << 15) != 0;
         return new PortFeatures(pf100gbFd, pf100mbFd, pf100mbHd, pf10gbFd, pf10mbFd, pf10mbHd, pf1gbFd,
                 pf1gbHd, pf1tbFd, pf40gbFd, pfAutoneg, pfCopper, pfFiber, pfOther, pfPause, pfPauseAsym);
     }
 
     private static MultipartReplyGroupFeaturesCase setGroupFeatures(final ByteBuf rawMessage) {
-        MultipartReplyGroupFeaturesCaseBuilder caseBuilder = new MultipartReplyGroupFeaturesCaseBuilder();
+        final MultipartReplyGroupFeaturesCaseBuilder caseBuilder = new MultipartReplyGroupFeaturesCaseBuilder();
         MultipartReplyGroupFeaturesBuilder featuresBuilder = new MultipartReplyGroupFeaturesBuilder();
         featuresBuilder.setTypes(createGroupType(rawMessage.readUnsignedInt()));
         featuresBuilder.setCapabilities(createCapabilities(rawMessage.readUnsignedInt()));
@@ -808,23 +815,24 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         return caseBuilder.build();
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static ActionType createActionBitmap(final long input) {
-        final Boolean atOutput = ((input) & (1 << 0)) != 0;
-        final Boolean atCopyTTLout = ((input) & (1 << 11)) != 0;
-        final Boolean atCopyTTLin = ((input) & (1 << 12)) != 0;
-        final Boolean atSetMplsTTL = ((input) & (1 << 15)) != 0;
-        final Boolean atDecMplsTTL = ((input) & (1 << 16)) != 0;
-        final Boolean atPushVLAN = ((input) & (1 << 17)) != 0;
-        final Boolean atPopVLAN = ((input) & (1 << 18)) != 0;
-        final Boolean atPushMPLS = ((input) & (1 << 19)) != 0;
-        final Boolean atPopMPLS = ((input) & (1 << 20)) != 0;
-        final Boolean atSetQueue = ((input) & (1 << 21)) != 0;
-        final Boolean atGroup = ((input) & (1 << 22)) != 0;
-        final Boolean atSetNWTTL = ((input) & (1 << 23)) != 0;
-        final Boolean atDecNWTTL = ((input) & (1 << 24)) != 0;
-        final Boolean atSetField = ((input) & (1 << 25)) != 0;
-        final Boolean atPushPBB = ((input) & (1 << 26)) != 0;
-        final Boolean atPopPBB = ((input) & (1 << 27)) != 0;
+        final Boolean atOutput = (input & 1 << 0) != 0;
+        final Boolean atCopyTTLout = (input & 1 << 11) != 0;
+        final Boolean atCopyTTLin = (input & 1 << 12) != 0;
+        final Boolean atSetMplsTTL = (input & 1 << 15) != 0;
+        final Boolean atDecMplsTTL = (input & 1 << 16) != 0;
+        final Boolean atPushVLAN = (input & 1 << 17) != 0;
+        final Boolean atPopVLAN = (input & 1 << 18) != 0;
+        final Boolean atPushMPLS = (input & 1 << 19) != 0;
+        final Boolean atPopMPLS = (input & 1 << 20) != 0;
+        final Boolean atSetQueue = (input & 1 << 21) != 0;
+        final Boolean atGroup = (input & 1 << 22) != 0;
+        final Boolean atSetNWTTL = (input & 1 << 23) != 0;
+        final Boolean atDecNWTTL = (input & 1 << 24) != 0;
+        final Boolean atSetField = (input & 1 << 25) != 0;
+        final Boolean atPushPBB = (input & 1 << 26) != 0;
+        final Boolean atPopPBB = (input & 1 << 27) != 0;
         final Boolean atExperimenter = false;
         return new ActionType(atCopyTTLin, atCopyTTLout, atDecMplsTTL,
                 atDecNWTTL, atExperimenter, atGroup, atOutput, atPopMPLS,
@@ -833,18 +841,18 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
     }
 
     private static GroupCapabilities createCapabilities(final long input) {
-        final Boolean gcSelectWeight = ((input) & (1 << 0)) != 0;
-        final Boolean gcSelectLiveness = ((input) & (1 << 1)) != 0;
-        final Boolean gcChaining = ((input) & (1 << 2)) != 0;
-        final Boolean gcChainingChecks = ((input) & (1 << 3)) != 0;
+        final Boolean gcSelectWeight = (input & 1 << 0) != 0;
+        final Boolean gcSelectLiveness = (input & 1 << 1) != 0;
+        final Boolean gcChaining = (input & 1 << 2) != 0;
+        final Boolean gcChainingChecks = (input & 1 << 3) != 0;
         return new GroupCapabilities(gcChaining, gcChainingChecks, gcSelectLiveness, gcSelectWeight);
     }
 
     private static GroupTypes createGroupType(final long input) {
-        final Boolean gtAll = ((input) & (1 << 0)) != 0;
-        final Boolean gtSelect = ((input) & (1 << 1)) != 0;
-        final Boolean gtIndirect = ((input) & (1 << 2)) != 0;
-        final Boolean gtFF = ((input) & (1 << 3)) != 0;
+        final Boolean gtAll = (input & 1 << 0) != 0;
+        final Boolean gtSelect = (input & 1 << 1) != 0;
+        final Boolean gtIndirect = (input & 1 << 2) != 0;
+        final Boolean gtFF = (input & 1 << 3) != 0;
         return new GroupTypes(gtAll, gtFF, gtIndirect, gtSelect);
     }
 
@@ -854,7 +862,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         List<GroupDesc> groupDescsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             GroupDescBuilder groupDescBuilder = new GroupDescBuilder();
-            int bodyLength = input.readUnsignedShort();
+            final int bodyLength = input.readUnsignedShort();
             groupDescBuilder.setType(GroupType.forValue(input.readUnsignedByte()));
             input.skipBytes(PADDING_IN_GROUP_DESC_HEADER);
             groupDescBuilder.setGroupId(new GroupId(input.readUnsignedInt()));
@@ -862,7 +870,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             List<BucketsList> bucketsList = new ArrayList<>();
             while (actualLength < bodyLength) {
                 BucketsListBuilder bucketsBuilder = new BucketsListBuilder();
-                int bucketsLength = input.readUnsignedShort();
+                final int bucketsLength = input.readUnsignedShort();
                 bucketsBuilder.setWeight(input.readUnsignedShort());
                 bucketsBuilder.setWatchPort(new PortNumber(input.readUnsignedInt()));
                 bucketsBuilder.setWatchGroup(input.readUnsignedInt());
index 008b22c3ac6f5025328b5e4c107825d0b94d596a..c4c5df2aac697c6a7bbbbc3fb283675755c6a3a6 100644 (file)
@@ -94,8 +94,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeaturePropertiesBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates MultipartRequestInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class MultipartRequestInputMessageFactory
         implements OFDeserializer<MultipartRequestInput>, DeserializerRegistryInjector {
@@ -125,53 +126,53 @@ public class MultipartRequestInputMessageFactory
         builder.setFlags(getMultipartRequestFlags(rawMessage.readUnsignedShort()));
         rawMessage.skipBytes(PADDING);
         switch (MultipartType.forValue(type)) {
-        case OFPMPDESC:
-            builder.setMultipartRequestBody(setDesc(rawMessage));
-            break;
-        case OFPMPFLOW:
-            builder.setMultipartRequestBody(setFlow(rawMessage));
-            break;
-        case OFPMPAGGREGATE:
-            builder.setMultipartRequestBody(setAggregate(rawMessage));
-            break;
-        case OFPMPTABLE:
-            builder.setMultipartRequestBody(setTable(rawMessage));
-            break;
-        case OFPMPTABLEFEATURES:
-            builder.setMultipartRequestBody(setTableFeatures(rawMessage));
-            break;
-        case OFPMPPORTSTATS:
-            builder.setMultipartRequestBody(setPortStats(rawMessage));
-            break;
-        case OFPMPPORTDESC:
-            builder.setMultipartRequestBody(setPortDesc(rawMessage));
-            break;
-        case OFPMPQUEUE:
-            builder.setMultipartRequestBody(setQueue(rawMessage));
-            break;
-        case OFPMPGROUP:
-            builder.setMultipartRequestBody(setGroup(rawMessage));
-            break;
-        case OFPMPGROUPDESC:
-            builder.setMultipartRequestBody(setGroupDesc(rawMessage));
-            break;
-        case OFPMPGROUPFEATURES:
-            builder.setMultipartRequestBody(setGroupFeatures(rawMessage));
-            break;
-        case OFPMPMETER:
-            builder.setMultipartRequestBody(setMeter(rawMessage));
-            break;
-        case OFPMPMETERCONFIG:
-            builder.setMultipartRequestBody(setMeterConfig(rawMessage));
-            break;
-        case OFPMPMETERFEATURES:
-            builder.setMultipartRequestBody(setMeterFeatures(rawMessage));
-            break;
-        case OFPMPEXPERIMENTER:
-            builder.setMultipartRequestBody(setExperimenter(rawMessage));
-            break;
-        default:
-            break;
+            case OFPMPDESC:
+                builder.setMultipartRequestBody(setDesc(rawMessage));
+                break;
+            case OFPMPFLOW:
+                builder.setMultipartRequestBody(setFlow(rawMessage));
+                break;
+            case OFPMPAGGREGATE:
+                builder.setMultipartRequestBody(setAggregate(rawMessage));
+                break;
+            case OFPMPTABLE:
+                builder.setMultipartRequestBody(setTable(rawMessage));
+                break;
+            case OFPMPTABLEFEATURES:
+                builder.setMultipartRequestBody(setTableFeatures(rawMessage));
+                break;
+            case OFPMPPORTSTATS:
+                builder.setMultipartRequestBody(setPortStats(rawMessage));
+                break;
+            case OFPMPPORTDESC:
+                builder.setMultipartRequestBody(setPortDesc(rawMessage));
+                break;
+            case OFPMPQUEUE:
+                builder.setMultipartRequestBody(setQueue(rawMessage));
+                break;
+            case OFPMPGROUP:
+                builder.setMultipartRequestBody(setGroup(rawMessage));
+                break;
+            case OFPMPGROUPDESC:
+                builder.setMultipartRequestBody(setGroupDesc(rawMessage));
+                break;
+            case OFPMPGROUPFEATURES:
+                builder.setMultipartRequestBody(setGroupFeatures(rawMessage));
+                break;
+            case OFPMPMETER:
+                builder.setMultipartRequestBody(setMeter(rawMessage));
+                break;
+            case OFPMPMETERCONFIG:
+                builder.setMultipartRequestBody(setMeterConfig(rawMessage));
+                break;
+            case OFPMPMETERFEATURES:
+                builder.setMultipartRequestBody(setMeterFeatures(rawMessage));
+                break;
+            case OFPMPEXPERIMENTER:
+                builder.setMultipartRequestBody(setExperimenter(rawMessage));
+                break;
+            default:
+                break;
         }
 
         return builder.build();
@@ -181,8 +182,9 @@ public class MultipartRequestInputMessageFactory
         return MultipartType.forValue(input);
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static MultipartRequestFlags getMultipartRequestFlags(int input) {
-        final Boolean _oFPMPFREQMORE = (input & (1 << 0)) > 0;
+        final Boolean _oFPMPFREQMORE = (input & 1 << 0) > 0;
         MultipartRequestFlags flag = new MultipartRequestFlags(_oFPMPFREQMORE);
         return flag;
     }
@@ -193,7 +195,7 @@ public class MultipartRequestInputMessageFactory
         List<TableFeatures> features = new ArrayList<>();
         while (input.readableBytes() > 0) {
             TableFeaturesBuilder featuresBuilder = new TableFeaturesBuilder();
-            int length = input.readUnsignedShort();
+            final int length = input.readUnsignedShort();
             featuresBuilder.setTableId(input.readUnsignedByte());
             input.skipBytes(PADDING_IN_MULTIPART_REQUEST_TABLE_FEATURES);
             featuresBuilder.setName(ByteBufUtils.decodeNullTerminatedString(input, MAX_TABLE_NAME_LENGTH));
@@ -227,7 +229,8 @@ public class MultipartRequestInputMessageFactory
             tableFeaturesLength -= propertyLength;
             if (type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONS)
                     || type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS)) {
-                InstructionRelatedTableFeaturePropertyBuilder insBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
+                InstructionRelatedTableFeaturePropertyBuilder insBuilder =
+                        new InstructionRelatedTableFeaturePropertyBuilder();
                 CodeKeyMaker keyMaker = CodeKeyMakerFactory.createInstructionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
                 List<Instruction> instructions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
                         propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
@@ -236,7 +239,8 @@ public class MultipartRequestInputMessageFactory
             } else if (type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLES)
                     || type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS)) {
                 propertyLength -= COMMON_PROPERTY_LENGTH;
-                NextTableRelatedTableFeaturePropertyBuilder tableBuilder = new NextTableRelatedTableFeaturePropertyBuilder();
+                NextTableRelatedTableFeaturePropertyBuilder tableBuilder =
+                        new NextTableRelatedTableFeaturePropertyBuilder();
                 List<NextTableIds> ids = new ArrayList<>();
                 while (propertyLength > 0) {
                     NextTableIdsBuilder nextTableIdsBuilder = new NextTableIdsBuilder();
@@ -302,7 +306,7 @@ public class MultipartRequestInputMessageFactory
     }
 
     private MultipartRequestFlowCase setFlow(ByteBuf input) {
-        MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
+        final MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
         MultipartRequestFlowBuilder flowBuilder = new MultipartRequestFlowBuilder();
         flowBuilder.setTableId(input.readUnsignedByte());
         input.skipBytes(FLOW_PADDING_1);
@@ -312,9 +316,9 @@ public class MultipartRequestInputMessageFactory
         byte[] cookie = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         input.readBytes(cookie);
         flowBuilder.setCookie(new BigInteger(1, cookie));
-        byte[] cookie_mask = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
-        input.readBytes(cookie_mask);
-        flowBuilder.setCookieMask(new BigInteger(1, cookie_mask));
+        final byte[] cookieMask = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+        input.readBytes(cookieMask);
+        flowBuilder.setCookieMask(new BigInteger(1, cookieMask));
         OFDeserializer<Match> matchDeserializer = registry.getDeserializer(
                 new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, EncodeConstants.EMPTY_VALUE, Match.class));
         flowBuilder.setMatch(matchDeserializer.deserialize(input));
@@ -323,7 +327,7 @@ public class MultipartRequestInputMessageFactory
     }
 
     private MultipartRequestAggregateCase setAggregate(ByteBuf input) {
-        MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
+        final MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
         MultipartRequestAggregateBuilder aggregateBuilder = new MultipartRequestAggregateBuilder();
         aggregateBuilder.setTableId(input.readUnsignedByte());
         input.skipBytes(AGGREGATE_PADDING_1);
@@ -333,9 +337,9 @@ public class MultipartRequestInputMessageFactory
         byte[] cookie = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         input.readBytes(cookie);
         aggregateBuilder.setCookie(new BigInteger(1, cookie));
-        byte[] cookie_mask = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
-        input.readBytes(cookie_mask);
-        aggregateBuilder.setCookieMask(new BigInteger(1, cookie_mask));
+        final byte[] cookieMask = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+        input.readBytes(cookieMask);
+        aggregateBuilder.setCookieMask(new BigInteger(1, cookieMask));
         OFDeserializer<Match> matchDeserializer = registry.getDeserializer(
                 new MessageCodeKey(EncodeConstants.OF13_VERSION_ID, EncodeConstants.EMPTY_VALUE, Match.class));
         aggregateBuilder.setMatch(matchDeserializer.deserialize(input));
index aa8b9c8d535b0f9838b53663c562e5317fa37f85..adfafe630c587709d6600be38aad39a2237eefa7 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.BadActionCodeV10;
@@ -23,7 +22,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessageBuilder;
 
 /**
- * Translates Error messages (OpenFlow v1.0)
+ * Translates Error messages (OpenFlow v1.0).
+ *
  * @author michal.polkorab
  */
 public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
@@ -64,69 +64,69 @@ public class OF10ErrorMessageFactory implements OFDeserializer<ErrorMessage> {
         int code = rawMessage.readUnsignedShort();
         if (type != null) {
             switch (type) {
-            case HELLOFAILED:
-            {
-                HelloFailedCodeV10 errorCode = HelloFailedCodeV10.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case HELLOFAILED:
+                {
+                    HelloFailedCodeV10 errorCode = HelloFailedCodeV10.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case BADREQUEST:
-            {
-                BadRequestCodeV10 errorCode = BadRequestCodeV10.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case BADREQUEST:
+                {
+                    BadRequestCodeV10 errorCode = BadRequestCodeV10.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case BADACTION:
-            {
-                BadActionCodeV10 errorCode = BadActionCodeV10.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case BADACTION:
+                {
+                    BadActionCodeV10 errorCode = BadActionCodeV10.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case FLOWMODFAILED:
-            {
-                FlowModFailedCodeV10 errorCode = FlowModFailedCodeV10.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case FLOWMODFAILED:
+                {
+                    FlowModFailedCodeV10 errorCode = FlowModFailedCodeV10.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case PORTMODFAILED:
-            {
-                PortModFailedCodeV10 errorCode = PortModFailedCodeV10.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case PORTMODFAILED:
+                {
+                    PortModFailedCodeV10 errorCode = PortModFailedCodeV10.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            case QUEUEOPFAILED:
-            {
-                QueueOpFailedCodeV10 errorCode = QueueOpFailedCodeV10.forValue(code);
-                if (errorCode != null) {
-                    setCode(builder, errorCode.getIntValue(), errorCode.name());
-                } else {
-                    setUnknownCode(builder, code);
+                case QUEUEOPFAILED:
+                {
+                    QueueOpFailedCodeV10 errorCode = QueueOpFailedCodeV10.forValue(code);
+                    if (errorCode != null) {
+                        setCode(builder, errorCode.getIntValue(), errorCode.name());
+                    } else {
+                        setUnknownCode(builder, code);
+                    }
+                    break;
                 }
-                break;
-            }
-            default:
-                setUnknownCode(builder, code);
-                break;
+                default:
+                    setUnknownCode(builder, code);
+                    break;
             }
         } else {
             setUnknownCode(builder, code);
index c94b0d11388aa2fdfc65785e808aa9c8549f0758..49089f6240feeb607eaecc0b729f14edba6491b6 100644 (file)
@@ -24,7 +24,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.features.reply.PhyPortBuilder;
 
 /**
- * Translates FeaturesReply messages (OpenFlow v1.0)
+ * Translates FeaturesReply messages (OpenFlow v1.0).
+ *
  * @author michal.polkorab
  */
 public class OF10FeaturesReplyMessageFactory implements OFDeserializer<GetFeaturesOutput> {
@@ -53,32 +54,32 @@ public class OF10FeaturesReplyMessageFactory implements OFDeserializer<GetFeatur
     }
 
     private static CapabilitiesV10 createCapabilitiesV10(final long input) {
-        final Boolean flowStats = (input & (1 << 0)) != 0;
-        final Boolean tableStats = (input & (1 << 1)) != 0;
-        final Boolean portStats = (input & (1 << 2)) != 0;
-        final Boolean stp = (input & (1 << 3)) != 0;
-        final Boolean reserved = (input & (1 << 4)) != 0;
-        final Boolean ipReasm = (input & (1 << 5)) != 0;
-        final Boolean queueStats = (input & (1 << 6)) != 0;
-        final Boolean arpMatchIp = (input & (1 << 7)) != 0;
+        final Boolean flowStats = (input & 1 << 0) != 0;
+        final Boolean tableStats = (input & 1 << 1) != 0;
+        final Boolean portStats = (input & 1 << 2) != 0;
+        final Boolean stp = (input & 1 << 3) != 0;
+        final Boolean reserved = (input & 1 << 4) != 0;
+        final Boolean ipReasm = (input & 1 << 5) != 0;
+        final Boolean queueStats = (input & 1 << 6) != 0;
+        final Boolean arpMatchIp = (input & 1 << 7) != 0;
         return new CapabilitiesV10(arpMatchIp, flowStats, ipReasm,
                 portStats, queueStats, reserved, stp, tableStats);
     }
 
     private static ActionTypeV10 createActionsV10(final long input) {
-        final Boolean output = (input & (1 << 0)) != 0;
-        final Boolean setVLANvid = (input & (1 << 1)) != 0;
-        final Boolean setVLANpcp = (input & (1 << 2)) != 0;
-        final Boolean stripVLAN = (input & (1 << 3)) != 0;
-        final Boolean setDLsrc = (input & (1 << 4)) != 0;
-        final Boolean setDLdst = (input & (1 << 5)) != 0;
-        final Boolean setNWsrc = (input & (1 << 6)) != 0;
-        final Boolean setNWdst = (input & (1 << 7)) != 0;
-        final Boolean setNWtos = (input & (1 << 8)) != 0;
-        final Boolean setTPsrc = (input & (1 << 9)) != 0;
-        final Boolean setTPdst = (input & (1 << 10)) != 0;
-        final Boolean enqueue = (input & (1 << 11)) != 0;
-        final Boolean vendor = (input & (1 << 12)) != 0;
+        final Boolean output = (input & 1 << 0) != 0;
+        final Boolean setVLANvid = (input & 1 << 1) != 0;
+        final Boolean setVLANpcp = (input & 1 << 2) != 0;
+        final Boolean stripVLAN = (input & 1 << 3) != 0;
+        final Boolean setDLsrc = (input & 1 << 4) != 0;
+        final Boolean setDLdst = (input & 1 << 5) != 0;
+        final Boolean setNWsrc = (input & 1 << 6) != 0;
+        final Boolean setNWdst = (input & 1 << 7) != 0;
+        final Boolean setNWtos = (input & 1 << 8) != 0;
+        final Boolean setTPsrc = (input & 1 << 9) != 0;
+        final Boolean setTPdst = (input & 1 << 10) != 0;
+        final Boolean enqueue = (input & 1 << 11) != 0;
+        final Boolean vendor = (input & 1 << 12) != 0;
         return new ActionTypeV10(enqueue, output, setDLdst, setDLsrc,
                 setNWdst, setNWsrc, setNWtos, setTPdst, setTPsrc,
                 setVLANpcp, setVLANvid, stripVLAN, vendor);
@@ -97,4 +98,4 @@ public class OF10FeaturesReplyMessageFactory implements OFDeserializer<GetFeatur
         builder.setPeerFeaturesV10(OpenflowUtils.createPortFeatures(rawMessage.readUnsignedInt()));
         return builder.build();
     }
-}
\ No newline at end of file
+}
index 1ff8c7a1e54ddd5599acaaa0ddd9624e06fb1d77..1e7cdbf72ad73717b10dc361ca3871b8360f9f7c 100644 (file)
@@ -14,8 +14,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates GetFeaturesInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10FeaturesRequestMessageFactory implements OFDeserializer<GetFeaturesInput> {
 
index 3357995a4167f1491f9a2bd346adb7d9d29567ca..e7eaf6ea2de70b5017e26038dfd40fa2309ae699 100644 (file)
@@ -27,8 +27,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates FlowModInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10FlowModInputMessageFactory implements OFDeserializer<FlowModInput>, DeserializerRegistryInjector {
 
@@ -65,10 +66,11 @@ public class OF10FlowModInputMessageFactory implements OFDeserializer<FlowModInp
         return builder.build();
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static FlowModFlagsV10 createFlowModFlagsFromBitmap(int input) {
-        final Boolean _oFPFFSENDFLOWREM = (input & (1 << 0)) > 0;
-        final Boolean _oFPFFCHECKOVERLAP = (input & (1 << 1)) > 0;
-        final Boolean _oFPFFEMERG = (input & (1 << 2)) > 0;
+        final Boolean _oFPFFSENDFLOWREM = (input & 1 << 0) > 0;
+        final Boolean _oFPFFCHECKOVERLAP = (input & 1 << 1) > 0;
+        final Boolean _oFPFFEMERG = (input & 1 << 2) > 0;
         return new FlowModFlagsV10(_oFPFFCHECKOVERLAP, _oFPFFEMERG, _oFPFFSENDFLOWREM);
     }
 
index b110e2d5a0f1f9229258590bc8c7447c939e29e3..5e6fde9ec7e301b7e58c198a921a39786f39828f 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.math.BigInteger;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
@@ -23,7 +21,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessageBuilder;
 
 /**
- * Translates FlowRemoved messages (OpenFlow v1.0)
+ * Translates FlowRemoved messages (OpenFlow v1.0).
+ *
  * @author michal.polkorab
  */
 public class OF10FlowRemovedMessageFactory implements OFDeserializer<FlowRemovedMessage>,
index 7584a734a6bd7a5985d677c8e30ea20e4347e7cf..30d739b896d7a31669cf11092840b5774707ffbe 100644 (file)
@@ -15,8 +15,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetQueueConfigInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates GetQueueConfigInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10GetQueueConfigInputMessageFactory implements OFDeserializer<GetQueueConfigInput> {
 
@@ -24,7 +25,7 @@ public class OF10GetQueueConfigInputMessageFactory implements OFDeserializer<Get
     public GetQueueConfigInput deserialize(ByteBuf rawMessage) {
         GetQueueConfigInputBuilder builder = new GetQueueConfigInputBuilder();
         builder.setVersion((short) EncodeConstants.OF10_VERSION_ID);
-        builder.setXid((rawMessage.readUnsignedInt()));
+        builder.setXid(rawMessage.readUnsignedInt());
         builder.setPort(new PortNumber((long) rawMessage.readUnsignedShort()));
         return builder.build();
     }
index 51a18867c255d437fccd25341f754ad8b8a494cd..879b88bc797be0e2a54b0f8f2bea55030d404b41 100644 (file)
@@ -9,14 +9,14 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloMessageBuilder;
 
 /**
- * Translates Hello messages (OpenFlow v1.0)
+ * Translates Hello messages (OpenFlow v1.0).
+ *
  * @author michal.polkorab
  */
 public class OF10HelloMessageFactory implements OFDeserializer<HelloMessage> {
index b3819445341ab4e3bdd2506b8edb78f3d3e4bd6d..f1e8bbb5b4a4d31268a061bce1c8ae5640dc3c08 100644 (file)
@@ -16,7 +16,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessageBuilder;
 
 /**
- * Translates PacketIn messages (OpenFlow v1.0)
+ * Translates PacketIn messages (OpenFlow v1.0).
+ *
  * @author michal.polkorab
  */
 public class OF10PacketInMessageFactory implements OFDeserializer<PacketInMessage> {
index 94cce9b1d04e78f20e40f66cb94399350ba25900..31f4b1692dc82c53ef1434cc6ff76a5ca4e56505 100644 (file)
@@ -22,8 +22,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates PacketOutInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10PacketOutInputMessageFactory implements OFDeserializer<PacketOutInput>, DeserializerRegistryInjector {
 
@@ -41,7 +42,7 @@ public class OF10PacketOutInputMessageFactory implements OFDeserializer<PacketOu
         builder.setXid(rawMessage.readUnsignedInt());
         builder.setBufferId(rawMessage.readUnsignedInt());
         builder.setInPort(new PortNumber((long) rawMessage.readUnsignedShort()));
-        int actions_len = rawMessage.readShort();
+        final int actions_len = rawMessage.readShort();
         CodeKeyMaker keyMaker = CodeKeyMakerFactory.createActionsKeyMaker(EncodeConstants.OF10_VERSION_ID);
         List<Action> actions = ListDeserializer.deserializeList(EncodeConstants.OF10_VERSION_ID, actions_len,
                 rawMessage, keyMaker, registry);
index 025f7ba4053c10393d4a9daad0bbfc2e7b27563d..4bf2331e0a478829131b8ef56f60ef4ee7b55c57 100644 (file)
@@ -18,8 +18,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates PortModInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10PortModInputMessageFactory implements OFDeserializer<PortModInput> {
 
@@ -37,29 +38,29 @@ public class OF10PortModInputMessageFactory implements OFDeserializer<PortModInp
     }
 
     private static PortConfigV10 createPortConfig(final long input) {
-        final Boolean _portDown = ((input) & (1 << 0)) > 0;
-        final Boolean _noStp = ((input) & (1 << 1)) > 0;
-        final Boolean _noRecv = ((input) & (1 << 2)) > 0;
-        final Boolean _noRecvStp = ((input) & (1 << 3)) > 0;
-        final Boolean _noFlood = ((input) & (1 << 4)) > 0;
-        final Boolean _noFwd = ((input) & (1 << 5)) > 0;
-        final Boolean _noPacketIn = ((input) & (1 << 6)) > 0;
+        final Boolean _portDown = (input & 1 << 0) > 0;
+        final Boolean _noStp = (input & 1 << 1) > 0;
+        final Boolean _noRecv = (input & 1 << 2) > 0;
+        final Boolean _noRecvStp = (input & 1 << 3) > 0;
+        final Boolean _noFlood = (input & 1 << 4) > 0;
+        final Boolean _noFwd = (input & 1 << 5) > 0;
+        final Boolean _noPacketIn = (input & 1 << 6) > 0;
         return new PortConfigV10(_noFlood, _noFwd, _noPacketIn, _noRecv, _noRecvStp, _noStp, _portDown);
     }
 
     private static PortFeaturesV10 createPortFeatures(final long input) {
-        final Boolean _10mbHd = ((input) & (1 << 0)) > 0;
-        final Boolean _10mbFd = ((input) & (1 << 1)) > 0;
-        final Boolean _100mbHd = ((input) & (1 << 2)) > 0;
-        final Boolean _100mbFd = ((input) & (1 << 3)) > 0;
-        final Boolean _1gbHd = ((input) & (1 << 4)) > 0;
-        final Boolean _1gbFd = ((input) & (1 << 5)) > 0;
-        final Boolean _10gbFd = ((input) & (1 << 6)) > 0;
-        final Boolean _copper = ((input) & (1 << 7)) > 0;
-        final Boolean _fiber = ((input) & (1 << 8)) > 0;
-        final Boolean _autoneg = ((input) & (1 << 9)) > 0;
-        final Boolean _pause = ((input) & (1 << 10)) > 0;
-        final Boolean _pauseAsym = ((input) & (1 << 11)) > 0;
+        final Boolean _10mbHd = (input & 1 << 0) > 0;
+        final Boolean _10mbFd = (input & 1 << 1) > 0;
+        final Boolean _100mbHd = (input & 1 << 2) > 0;
+        final Boolean _100mbFd = (input & 1 << 3) > 0;
+        final Boolean _1gbHd = (input & 1 << 4) > 0;
+        final Boolean _1gbFd = (input & 1 << 5) > 0;
+        final Boolean _10gbFd = (input & 1 << 6) > 0;
+        final Boolean _copper = (input & 1 << 7) > 0;
+        final Boolean _fiber = (input & 1 << 8) > 0;
+        final Boolean _autoneg = (input & 1 << 9) > 0;
+        final Boolean _pause = (input & 1 << 10) > 0;
+        final Boolean _pauseAsym = (input & 1 << 11) > 0;
         return new PortFeaturesV10(_100mbFd, _100mbHd, _10gbFd, _10mbFd, _10mbHd, _1gbFd, _1gbHd, _autoneg, _copper,
                 _fiber, _pause, _pauseAsym);
     }
index 2bab42b6f76cf59dd615364ff2e9184aa61c8b64..89df5630fac2a7f1d047205e92b053c62c0be5c6 100644 (file)
@@ -18,7 +18,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessageBuilder;
 
 /**
- * Translates PortStatus messages (OpenFlow v1.0)
+ * Translates PortStatus messages (OpenFlow v1.0).
+ *
  * @author michal.polkorab
  */
 public class OF10PortStatusMessageFactory implements OFDeserializer<PortStatusMessage> {
@@ -47,4 +48,4 @@ public class OF10PortStatusMessageFactory implements OFDeserializer<PortStatusMe
         builder.setSupportedFeaturesV10(OpenflowUtils.createPortFeatures(rawMessage.readUnsignedInt()));
         builder.setPeerFeaturesV10(OpenflowUtils.createPortFeatures(rawMessage.readUnsignedInt()));
     }
-}
\ No newline at end of file
+}
index 6ca9474e725a77f00f14c9e0c6c06911541a86b2..c8a259e80e5ab014eb2ed2dc5392972894890546 100644 (file)
@@ -9,10 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.ArrayList;
 import java.util.List;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.RateQueueProperty;
@@ -28,7 +26,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
 
 /**
- * Translates QueueGetConfigReply messages (OpenFlow v1.0)
+ * Translates QueueGetConfigReply messages (OpenFlow v1.0).
+ *
  * @author michal.polkorab
  */
 public class OF10QueueGetConfigReplyMessageFactory implements OFDeserializer<GetQueueConfigOutput> {
@@ -43,14 +42,14 @@ public class OF10QueueGetConfigReplyMessageFactory implements OFDeserializer<Get
     public GetQueueConfigOutput deserialize(ByteBuf rawMessage) {
         GetQueueConfigOutputBuilder builder = new GetQueueConfigOutputBuilder();
         builder.setVersion((short) EncodeConstants.OF10_VERSION_ID);
-        builder.setXid((rawMessage.readUnsignedInt()));
+        builder.setXid(rawMessage.readUnsignedInt());
         builder.setPort(new PortNumber((long) rawMessage.readUnsignedShort()));
         rawMessage.skipBytes(PADDING_IN_QUEUE_GET_CONFIG_REPLY_HEADER);
         builder.setQueues(createQueuesList(rawMessage));
         return builder.build();
     }
 
-    private static List<Queues> createQueuesList(ByteBuf input){
+    private static List<Queues> createQueuesList(ByteBuf input) {
         List<Queues> queuesList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             QueuesBuilder queueBuilder = new QueuesBuilder();
@@ -63,7 +62,7 @@ public class OF10QueueGetConfigReplyMessageFactory implements OFDeserializer<Get
         return queuesList;
     }
 
-    private static List<QueueProperty> createPropertiesList(ByteBuf input, int length){
+    private static List<QueueProperty> createPropertiesList(ByteBuf input, int length) {
         int propertiesLength = length;
         List<QueueProperty> propertiesList = new ArrayList<>();
         while (propertiesLength > 0) {
@@ -82,4 +81,4 @@ public class OF10QueueGetConfigReplyMessageFactory implements OFDeserializer<Get
         }
         return propertiesList;
     }
-}
\ No newline at end of file
+}
index f09992853612145762fbf7f0363855aba544feba..d6e4702b3f21e1f9014d46fda7c60d8cfd4ed3e6 100644 (file)
@@ -62,7 +62,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table._case.multipart.reply.table.TableStatsBuilder;
 
 /**
- * Translates StatsReply messages (OpenFlow v1.0)
+ * Translates StatsReply messages (OpenFlow v1.0).
  *
  * @author michal.polkorab
  */
@@ -119,7 +119,7 @@ public class OF10StatsReplyMessageFactory implements OFDeserializer<MultipartRep
     }
 
     private static MultipartReplyDescCase setDesc(ByteBuf input) {
-        MultipartReplyDescCaseBuilder caseBuilder = new MultipartReplyDescCaseBuilder();
+        final MultipartReplyDescCaseBuilder caseBuilder = new MultipartReplyDescCaseBuilder();
         MultipartReplyDescBuilder descBuilder = new MultipartReplyDescBuilder();
         byte[] mfrDescBytes = new byte[DESC_STR_LEN];
         input.readBytes(mfrDescBytes);
@@ -151,7 +151,7 @@ public class OF10StatsReplyMessageFactory implements OFDeserializer<MultipartRep
         List<FlowStats> flowStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             FlowStatsBuilder flowStatsBuilder = new FlowStatsBuilder();
-            int length = input.readUnsignedShort();
+            final int length = input.readUnsignedShort();
             flowStatsBuilder.setTableId(input.readUnsignedByte());
             input.skipBytes(PADDING_IN_FLOW_STATS_HEADER);
             OFDeserializer<MatchV10> matchDeserializer = registry.getDeserializer(
@@ -184,7 +184,7 @@ public class OF10StatsReplyMessageFactory implements OFDeserializer<MultipartRep
     }
 
     private static MultipartReplyAggregateCase setAggregate(ByteBuf input) {
-        MultipartReplyAggregateCaseBuilder caseBuilder = new MultipartReplyAggregateCaseBuilder();
+        final MultipartReplyAggregateCaseBuilder caseBuilder = new MultipartReplyAggregateCaseBuilder();
         MultipartReplyAggregateBuilder builder = new MultipartReplyAggregateBuilder();
         byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         input.readBytes(packetCount);
@@ -199,7 +199,7 @@ public class OF10StatsReplyMessageFactory implements OFDeserializer<MultipartRep
     }
 
     private static MultipartReplyTableCase setTable(ByteBuf input) {
-        MultipartReplyTableCaseBuilder caseBuilder = new MultipartReplyTableCaseBuilder();
+        final MultipartReplyTableCaseBuilder caseBuilder = new MultipartReplyTableCaseBuilder();
         MultipartReplyTableBuilder builder = new MultipartReplyTableBuilder();
         List<TableStats> tableStatsList = new ArrayList<>();
         // TODO - replace ">= TABLE_STATS_LENGTH" with "> 0" after fix in OVS switch
@@ -306,14 +306,15 @@ public class OF10StatsReplyMessageFactory implements OFDeserializer<MultipartRep
 
     private MultipartReplyExperimenterCase setExperimenter(ByteBuf input) {
         final long expId = input.readUnsignedInt();
-        final OFDeserializer<ExperimenterDataOfChoice> deserializer = registry.getDeserializer(ExperimenterDeserializerKeyFactory.createMultipartReplyVendorMessageDeserializerKey(
+        final OFDeserializer<ExperimenterDataOfChoice> deserializer = registry.getDeserializer(
+                ExperimenterDeserializerKeyFactory.createMultipartReplyVendorMessageDeserializerKey(
                 EncodeConstants.OF10_VERSION_ID, expId));
 
         final MultipartReplyExperimenterBuilder mpExperimenterBld = new MultipartReplyExperimenterBuilder()
                 .setExperimenter(new ExperimenterId(expId))
                 .setExperimenterDataOfChoice(deserializer.deserialize(input));
-        final MultipartReplyExperimenterCaseBuilder mpReplyExperimenterCaseBld = new MultipartReplyExperimenterCaseBuilder()
-                .setMultipartReplyExperimenter(mpExperimenterBld.build());
+        final MultipartReplyExperimenterCaseBuilder mpReplyExperimenterCaseBld =
+                new MultipartReplyExperimenterCaseBuilder().setMultipartReplyExperimenter(mpExperimenterBld.build());
         return mpReplyExperimenterCaseBld.build();
     }
 
index 4f49f1953c37af4d2ef68915ee53854269457195..df1c003ea4eb5e2e059748c855cb48e4c2799437 100644 (file)
@@ -41,8 +41,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table._case.MultipartRequestTableBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates MultipartRequestInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class OF10StatsRequestInputFactory
         implements OFDeserializer<MultipartRequestInput>, DeserializerRegistryInjector {
@@ -59,29 +60,29 @@ public class OF10StatsRequestInputFactory
         builder.setType(getMultipartType(type));
         builder.setFlags(getMultipartRequestFlags(rawMessage.readUnsignedShort()));
         switch (getMultipartType(type)) {
-        case OFPMPDESC:
-            builder.setMultipartRequestBody(setDesc(rawMessage));
-            break;
-        case OFPMPFLOW:
-            builder.setMultipartRequestBody(setFlow(rawMessage));
-            break;
-        case OFPMPAGGREGATE:
-            builder.setMultipartRequestBody(setAggregate(rawMessage));
-            break;
-        case OFPMPTABLE:
-            builder.setMultipartRequestBody(setTable(rawMessage));
-            break;
-        case OFPMPPORTSTATS:
-            builder.setMultipartRequestBody(setPortStats(rawMessage));
-            break;
-        case OFPMPQUEUE:
-            builder.setMultipartRequestBody(setQueue(rawMessage));
-            break;
-        case OFPMPEXPERIMENTER:
-            builder.setMultipartRequestBody(setExperimenter(rawMessage));
-            break;
-        default:
-            break;
+            case OFPMPDESC:
+                builder.setMultipartRequestBody(setDesc(rawMessage));
+                break;
+            case OFPMPFLOW:
+                builder.setMultipartRequestBody(setFlow(rawMessage));
+                break;
+            case OFPMPAGGREGATE:
+                builder.setMultipartRequestBody(setAggregate(rawMessage));
+                break;
+            case OFPMPTABLE:
+                builder.setMultipartRequestBody(setTable(rawMessage));
+                break;
+            case OFPMPPORTSTATS:
+                builder.setMultipartRequestBody(setPortStats(rawMessage));
+                break;
+            case OFPMPQUEUE:
+                builder.setMultipartRequestBody(setQueue(rawMessage));
+                break;
+            case OFPMPEXPERIMENTER:
+                builder.setMultipartRequestBody(setExperimenter(rawMessage));
+                break;
+            default:
+                break;
         }
         return builder.build();
     }
@@ -94,7 +95,7 @@ public class OF10StatsRequestInputFactory
     }
 
     private MultipartRequestQueueCase setQueue(ByteBuf input) {
-        MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
+        final MultipartRequestQueueCaseBuilder caseBuilder = new MultipartRequestQueueCaseBuilder();
         MultipartRequestQueueBuilder queueBuilder = new MultipartRequestQueueBuilder();
         queueBuilder.setPortNo((long) input.readUnsignedShort());
         input.skipBytes(2);
@@ -120,7 +121,7 @@ public class OF10StatsRequestInputFactory
     }
 
     private MultipartRequestAggregateCase setAggregate(ByteBuf input) {
-        MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
+        final MultipartRequestAggregateCaseBuilder caseBuilder = new MultipartRequestAggregateCaseBuilder();
         MultipartRequestAggregateBuilder aggregateBuilder = new MultipartRequestAggregateBuilder();
         OFDeserializer<MatchV10> matchDeserializer = registry.getDeserializer(
                 new MessageCodeKey(EncodeConstants.OF10_VERSION_ID, EncodeConstants.EMPTY_VALUE, MatchV10.class));
@@ -133,7 +134,7 @@ public class OF10StatsRequestInputFactory
     }
 
     private MultipartRequestFlowCase setFlow(ByteBuf input) {
-        MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
+        final MultipartRequestFlowCaseBuilder caseBuilder = new MultipartRequestFlowCaseBuilder();
         MultipartRequestFlowBuilder flowBuilder = new MultipartRequestFlowBuilder();
         OFDeserializer<MatchV10> matchDeserializer = registry.getDeserializer(
                 new MessageCodeKey(EncodeConstants.OF10_VERSION_ID, EncodeConstants.EMPTY_VALUE, MatchV10.class));
@@ -153,8 +154,9 @@ public class OF10StatsRequestInputFactory
         return caseBuilder.build();
     }
 
+    @SuppressWarnings("checkstyle:AbbreviationAsWordInName")
     private static MultipartRequestFlags getMultipartRequestFlags(int input) {
-        final Boolean _oFPMPFREQMORE = (input & (1 << 0)) > 0;
+        final Boolean _oFPMPFREQMORE = (input & 1 << 0) > 0;
         MultipartRequestFlags flag = new MultipartRequestFlags(_oFPMPFREQMORE);
         return flag;
     }
index a69baeea9164cde1d4e26915529341335a9851d0..c0332d68e6d44ba44ec328e9d94519b3e4268089 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.math.BigInteger;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
@@ -24,7 +22,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessageBuilder;
 
 /**
- * Translates PacketIn messages
+ * Translates PacketIn messages.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
index 919a8e7401f19697bdf221633689223bc5ecb4f8..1a3cb50205f06ad36ab90e846a6c6bd1ef57c566 100644 (file)
@@ -22,8 +22,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInputBuilder;
 
 public class PacketOutInputMessageFactory implements OFDeserializer<PacketOutInput>, DeserializerRegistryInjector {
+    private static final byte PADDING = 6;
+
     private DeserializerRegistry registry;
-    private final byte PADDING = 6;
 
     @Override
     public PacketOutInput deserialize(ByteBuf rawMessage) {
@@ -32,10 +33,10 @@ public class PacketOutInputMessageFactory implements OFDeserializer<PacketOutInp
         builder.setXid(rawMessage.readUnsignedInt());
         builder.setBufferId(rawMessage.readUnsignedInt());
         builder.setInPort(new PortNumber(rawMessage.readUnsignedInt()));
-        int actions_len = rawMessage.readShort();
+        int actionsLen = rawMessage.readShort();
         rawMessage.skipBytes(PADDING);
         CodeKeyMaker keyMaker = CodeKeyMakerFactory.createActionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
-        List<Action> actions = ListDeserializer.deserializeList(EncodeConstants.OF13_VERSION_ID, actions_len,
+        List<Action> actions = ListDeserializer.deserializeList(EncodeConstants.OF13_VERSION_ID, actionsLen,
                 rawMessage, keyMaker, registry);
         builder.setAction(actions);
         byte[] data = new byte[rawMessage.readableBytes()];
@@ -50,4 +51,4 @@ public class PacketOutInputMessageFactory implements OFDeserializer<PacketOutInp
     public void injectDeserializerRegistry(DeserializerRegistry deserializerRegistry) {
         registry = deserializerRegistry;
     }
-}
\ No newline at end of file
+}
index 55209d5d4a1f5243241d80a6d4c45dac4d3c4d75..45b69ef0e2d5cdf64ea5802b855eb4dd604edeb9 100644 (file)
@@ -18,8 +18,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortModInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates PortModInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class PortModInputMessageFactory implements OFDeserializer<PortModInput> {
 
@@ -44,30 +45,30 @@ public class PortModInputMessageFactory implements OFDeserializer<PortModInput>
     }
 
     private static PortConfig createPortConfig(final long input) {
-        final Boolean pcPortDown = ((input) & (1 << 0)) != 0;
-        final Boolean pcNRecv = ((input) & (1 << 2)) != 0;
-        final Boolean pcNFwd = ((input) & (1 << 5)) != 0;
-        final Boolean pcNPacketIn = ((input) & (1 << 6)) != 0;
+        final Boolean pcPortDown = (input & 1 << 0) != 0;
+        final Boolean pcNRecv = (input & 1 << 2) != 0;
+        final Boolean pcNFwd = (input & 1 << 5) != 0;
+        final Boolean pcNPacketIn = (input & 1 << 6) != 0;
         return new PortConfig(pcNFwd, pcNPacketIn, pcNRecv, pcPortDown);
     }
 
     private static PortFeatures createPortFeatures(final long input) {
-        final Boolean pf10mbHd = ((input) & (1 << 0)) != 0;
-        final Boolean pf10mbFd = ((input) & (1 << 1)) != 0;
-        final Boolean pf100mbHd = ((input) & (1 << 2)) != 0;
-        final Boolean pf100mbFd = ((input) & (1 << 3)) != 0;
-        final Boolean pf1gbHd = ((input) & (1 << 4)) != 0;
-        final Boolean pf1gbFd = ((input) & (1 << 5)) != 0;
-        final Boolean pf10gbFd = ((input) & (1 << 6)) != 0;
-        final Boolean pf40gbFd = ((input) & (1 << 7)) != 0;
-        final Boolean pf100gbFd = ((input) & (1 << 8)) != 0;
-        final Boolean pf1tbFd = ((input) & (1 << 9)) != 0;
-        final Boolean pfOther = ((input) & (1 << 10)) != 0;
-        final Boolean pfCopper = ((input) & (1 << 11)) != 0;
-        final Boolean pfFiber = ((input) & (1 << 12)) != 0;
-        final Boolean pfAutoneg = ((input) & (1 << 13)) != 0;
-        final Boolean pfPause = ((input) & (1 << 14)) != 0;
-        final Boolean pfPauseAsym = ((input) & (1 << 15)) != 0;
+        final Boolean pf10mbHd = (input & 1 << 0) != 0;
+        final Boolean pf10mbFd = (input & 1 << 1) != 0;
+        final Boolean pf100mbHd = (input & 1 << 2) != 0;
+        final Boolean pf100mbFd = (input & 1 << 3) != 0;
+        final Boolean pf1gbHd = (input & 1 << 4) != 0;
+        final Boolean pf1gbFd = (input & 1 << 5) != 0;
+        final Boolean pf10gbFd = (input & 1 << 6) != 0;
+        final Boolean pf40gbFd = (input & 1 << 7) != 0;
+        final Boolean pf100gbFd = (input & 1 << 8) != 0;
+        final Boolean pf1tbFd = (input & 1 << 9) != 0;
+        final Boolean pfOther = (input & 1 << 10) != 0;
+        final Boolean pfCopper = (input & 1 << 11) != 0;
+        final Boolean pfFiber = (input & 1 << 12) != 0;
+        final Boolean pfAutoneg = (input & 1 << 13) != 0;
+        final Boolean pfPause = (input & 1 << 14) != 0;
+        final Boolean pfPauseAsym = (input & 1 << 15) != 0;
         return new PortFeatures(pf100gbFd, pf100mbFd, pf100mbHd, pf10gbFd, pf10mbFd, pf10mbHd, pf1gbFd, pf1gbHd,
                 pf1tbFd, pf40gbFd, pfAutoneg, pfCopper, pfFiber, pfOther, pfPause, pfPauseAsym);
     }
index 5310aa2f01122c0d845c93692a614efdb7f7344b..6eb2e23257b5cc6b792fd3cf5e65ee8b6a607fbd 100644 (file)
@@ -20,7 +20,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessageBuilder;
 
 /**
- * Translates PortStatus messages
+ * Translates PortStatus messages.
+ *
  * @author michal.polkorab
  * @author timotej.kubas
  */
@@ -53,39 +54,39 @@ public class PortStatusMessageFactory implements OFDeserializer<PortStatusMessag
         return builder.build();
     }
 
-    private static PortFeatures createPortFeatures(final long input){
-        final Boolean pf10mbHd = ((input) & (1<<0)) != 0;
-        final Boolean pf10mbFd = ((input) & (1<<1)) != 0;
-        final Boolean pf100mbHd = ((input) & (1<<2)) != 0;
-        final Boolean pf100mbFd = ((input) & (1<<3)) != 0;
-        final Boolean pf1gbHd = ((input) & (1<<4)) != 0;
-        final Boolean pf1gbFd = ((input) & (1<<5)) != 0;
-        final Boolean pf10gbFd = ((input) & (1<<6)) != 0;
-        final Boolean pf40gbFd = ((input) & (1<<7)) != 0;
-        final Boolean pf100gbFd = ((input) & (1<<8)) != 0;
-        final Boolean pf1tbFd = ((input) & (1<<9)) != 0;
-        final Boolean pfOther = ((input) & (1<<10)) != 0;
-        final Boolean pfCopper = ((input) & (1<<11)) != 0;
-        final Boolean pfFiber = ((input) & (1<<12)) != 0;
-        final Boolean pfAutoneg = ((input) & (1<<13)) != 0;
-        final Boolean pfPause = ((input) & (1<<14)) != 0;
-        final Boolean pfPauseAsym = ((input) & (1<<15)) != 0;
+    private static PortFeatures createPortFeatures(final long input) {
+        final Boolean pf10mbHd = (input & 1 << 0) != 0;
+        final Boolean pf10mbFd = (input & 1 << 1) != 0;
+        final Boolean pf100mbHd = (input & 1 << 2) != 0;
+        final Boolean pf100mbFd = (input & 1 << 3) != 0;
+        final Boolean pf1gbHd = (input & 1 << 4) != 0;
+        final Boolean pf1gbFd = (input & 1 << 5) != 0;
+        final Boolean pf10gbFd = (input & 1 << 6) != 0;
+        final Boolean pf40gbFd = (input & 1 << 7) != 0;
+        final Boolean pf100gbFd = (input & 1 << 8) != 0;
+        final Boolean pf1tbFd = (input & 1 << 9) != 0;
+        final Boolean pfOther = (input & 1 << 10) != 0;
+        final Boolean pfCopper = (input & 1 << 11) != 0;
+        final Boolean pfFiber = (input & 1 << 12) != 0;
+        final Boolean pfAutoneg = (input & 1 << 13) != 0;
+        final Boolean pfPause = (input & 1 << 14) != 0;
+        final Boolean pfPauseAsym = (input & 1 << 15) != 0;
         return new PortFeatures(pf100gbFd, pf100mbFd, pf100mbHd, pf10gbFd, pf10mbFd, pf10mbHd, pf1gbFd,
                 pf1gbHd, pf1tbFd, pf40gbFd, pfAutoneg, pfCopper, pfFiber, pfOther, pfPause, pfPauseAsym);
     }
 
-    private static PortState createPortState(final long input){
-        final Boolean psLinkDown = ((input) & (1<<0)) != 0;
-        final Boolean psBblocked  = ((input) & (1<<1)) != 0;
-        final Boolean psLive     = ((input) & (1<<2)) != 0;
+    private static PortState createPortState(final long input) {
+        final Boolean psLinkDown = (input & 1 << 0) != 0;
+        final Boolean psBblocked = (input & 1 << 1) != 0;
+        final Boolean psLive = (input & 1 << 2) != 0;
         return new PortState(psBblocked, psLinkDown, psLive);
     }
 
-    private static PortConfig createPortConfig(final long input){
-        final Boolean pcPortDown   = ((input) & (1<<0)) != 0;
-        final Boolean pcNoRecv    = ((input) & (1<<2)) != 0;
-        final Boolean pcNoFwd       = ((input) & (1<<5)) != 0;
-        final Boolean pcNoPacketIn = ((input) & (1<<6)) != 0;
+    private static PortConfig createPortConfig(final long input) {
+        final Boolean pcPortDown = (input & 1 << 0) != 0;
+        final Boolean pcNoRecv = (input & 1 << 2) != 0;
+        final Boolean pcNoFwd = (input & 1 << 5) != 0;
+        final Boolean pcNoPacketIn = (input & 1 << 6) != 0;
         return new PortConfig(pcNoFwd, pcNoPacketIn, pcNoRecv, pcPortDown);
     }
 }
index 6d6f77477598154da47636aec5d3fb5ed2316a74..74e98efbcc41ba4364acf0767d615cd7ad6c2e20 100644 (file)
@@ -9,10 +9,8 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.ArrayList;
 import java.util.List;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
@@ -31,7 +29,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueuePropertyBuilder;
 
 /**
- * Translates QueueGetConfigReply messages
+ * Translates QueueGetConfigReply messages.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
@@ -49,14 +48,14 @@ public class QueueGetConfigReplyMessageFactory implements OFDeserializer<GetQueu
     public GetQueueConfigOutput deserialize(ByteBuf rawMessage) {
         GetQueueConfigOutputBuilder builder = new GetQueueConfigOutputBuilder();
         builder.setVersion((short) EncodeConstants.OF13_VERSION_ID);
-        builder.setXid((rawMessage.readUnsignedInt()));
+        builder.setXid(rawMessage.readUnsignedInt());
         builder.setPort(new PortNumber(rawMessage.readUnsignedInt()));
         rawMessage.skipBytes(PADDING_IN_QUEUE_GET_CONFIG_REPLY_HEADER);
         builder.setQueues(createQueuesList(rawMessage));
         return builder.build();
     }
 
-    private List<Queues> createQueuesList(ByteBuf input){
+    private List<Queues> createQueuesList(ByteBuf input) {
         List<Queues> queuesList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             QueuesBuilder queueBuilder = new QueuesBuilder();
@@ -70,7 +69,7 @@ public class QueueGetConfigReplyMessageFactory implements OFDeserializer<GetQueu
         return queuesList;
     }
 
-    private List<QueueProperty> createPropertiesList(ByteBuf input, int length){
+    private List<QueueProperty> createPropertiesList(ByteBuf input, int length) {
         int propertiesLength = length;
         List<QueueProperty> propertiesList = new ArrayList<>();
         while (propertiesLength > 0) {
index f42bd84d7bff169fd5f375f2e96d9763805c167d..ce54a8929df30d30574f6128dec67f5130820b07 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.factories;
 
 import io.netty.buffer.ByteBuf;
-
 import java.math.BigInteger;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ControllerRole;
@@ -19,11 +17,12 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestOutputBuilder;
 
 /**
- * Translates RoleReply messages
+ * Translates RoleReply messages.
+ *
  * @author timotej.kubas
  * @author michal.polkorab
  */
-public class RoleReplyMessageFactory implements OFDeserializer<RoleRequestOutput>{
+public class RoleReplyMessageFactory implements OFDeserializer<RoleRequestOutput> {
 
     private static final byte PADDING_IN_ROLE_REPLY_HEADER = 4;
 
index 1627f2b589fb936a1a48f2453c3b7550d1e274f8..02f496f66f6566a1a6a79696467155fadb128413 100644 (file)
@@ -16,8 +16,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.RoleRequestInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates RoleRequestInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class RoleRequestInputMessageFactory implements OFDeserializer<RoleRequestInput> {
 
@@ -27,7 +28,7 @@ public class RoleRequestInputMessageFactory implements OFDeserializer<RoleReques
     public RoleRequestInput deserialize(ByteBuf rawMessage) {
         RoleRequestInputBuilder builder = new RoleRequestInputBuilder();
         builder.setVersion((short) EncodeConstants.OF13_VERSION_ID);
-        builder.setXid((rawMessage.readUnsignedInt()));
+        builder.setXid(rawMessage.readUnsignedInt());
         builder.setRole(ControllerRole.forValue(rawMessage.readInt()));
         rawMessage.skipBytes(PADDING);
         byte[] generationId = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
index af18069e526e518b666f0796f73225e35c688f85..a1a6270624c3cd7fc669635310a1ef3d360609ce 100644 (file)
@@ -25,8 +25,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.async.body.grouping.PortStatusMaskBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates SetAsyncInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class SetAsyncInputMessageFactory implements OFDeserializer<SetAsyncInput> {
 
@@ -56,13 +57,13 @@ public class SetAsyncInputMessageFactory implements OFDeserializer<SetAsyncInput
 
     private static List<PacketInReason> decodePacketInReasons(long input) {
         List<PacketInReason> reasons = new ArrayList<>();
-        if ((input & (1 << 0)) != 0) {
+        if ((input & 1 << 0) != 0) {
             reasons.add(PacketInReason.OFPRNOMATCH);
         }
-        if ((input & (1 << 1)) != 0) {
+        if ((input & 1 << 1) != 0) {
             reasons.add(PacketInReason.OFPRACTION);
         }
-        if ((input & (1 << 2)) != 0) {
+        if ((input & 1 << 2) != 0) {
             reasons.add(PacketInReason.OFPRINVALIDTTL);
         }
         return reasons;
@@ -81,13 +82,13 @@ public class SetAsyncInputMessageFactory implements OFDeserializer<SetAsyncInput
 
     private static List<PortReason> decodePortReasons(long input) {
         List<PortReason> reasons = new ArrayList<>();
-        if ((input & (1 << 0)) != 0) {
+        if ((input & 1 << 0) != 0) {
             reasons.add(PortReason.OFPPRADD);
         }
-        if ((input & (1 << 1)) != 0) {
+        if ((input & 1 << 1) != 0) {
             reasons.add(PortReason.OFPPRDELETE);
         }
-        if ((input & (1 << 2)) != 0) {
+        if ((input & 1 << 2) != 0) {
             reasons.add(PortReason.OFPPRMODIFY);
         }
         return reasons;
@@ -106,16 +107,16 @@ public class SetAsyncInputMessageFactory implements OFDeserializer<SetAsyncInput
 
     private static List<FlowRemovedReason> decodeFlowRemovedReasons(long input) {
         List<FlowRemovedReason> reasons = new ArrayList<>();
-        if ((input & (1 << 0)) != 0) {
+        if ((input & 1 << 0) != 0) {
             reasons.add(FlowRemovedReason.OFPRRIDLETIMEOUT);
         }
-        if ((input & (1 << 1)) != 0) {
+        if ((input & 1 << 1) != 0) {
             reasons.add(FlowRemovedReason.OFPRRHARDTIMEOUT);
         }
-        if ((input & (1 << 2)) != 0) {
+        if ((input & 1 << 2) != 0) {
             reasons.add(FlowRemovedReason.OFPRRDELETE);
         }
-        if ((input & (1 << 3)) != 0) {
+        if ((input & 1 << 3) != 0) {
             reasons.add(FlowRemovedReason.OFPRRGROUPDELETE);
         }
         return reasons;
index 425bc579e6c0be8440bf9d78f146a1c1adf6e22f..2660260184bde55cda4fc67fccdcdc448ee8c000 100644 (file)
@@ -16,8 +16,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.TableModInputBuilder;
 
 /**
- * @author giuseppex.petralia@intel.com
+ * Translates TableModInput messages.
  *
+ * @author giuseppex.petralia@intel.com
  */
 public class TableModInputMessageFactory implements OFDeserializer<TableModInput> {
 
index 9461da1c9ca6f6738be09dad69e0f3cbccffd13f..e78e2b677e7b55090953540097b8449be72d8341 100644 (file)
@@ -20,6 +20,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice;
 
 /**
+ * Translates ExperimenterMessages.
+ *
  * @author michal.polkorab
  */
 public class VendorMessageFactory implements OFDeserializer<ExperimenterMessage>,
@@ -45,7 +47,7 @@ public class VendorMessageFactory implements OFDeserializer<ExperimenterMessage>
     }
 
     @Override
-    public void injectDeserializerRegistry(DeserializerRegistry deserializerRegistry) {
-        this.deserializerRegistry = deserializerRegistry;
+    public void injectDeserializerRegistry(DeserializerRegistry registry) {
+        this.deserializerRegistry = registry;
     }
-}
\ No newline at end of file
+}
index 2d17ed63eeeb71d5fa69803d00b4add1e082eca1..557b9a4d9873c2d49a2bdd29419eb311fbeb0d4f 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 
 import io.netty.buffer.ByteBuf;
-
 import java.util.List;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
@@ -23,9 +21,9 @@ import org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 
-/**
- * @author michal.polkorab
+/** Base class for an action instruction deserializer.
  *
+ * @author michal.polkorab
  */
 public abstract class AbstractActionInstructionDeserializer implements OFDeserializer<Instruction>,
         DeserializerRegistryInjector {
index ff5bffce92b7a4bdc8b1902dc70a233f1c446fae..a963f498cdf7fe855f828d571268dbf8c80e45e2 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
@@ -19,15 +18,16 @@ 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.InstructionBuilder;
 
 /**
- * @author michal.polkorab
+ * Deserializer for apply actions instruction.
  *
+ * @author michal.polkorab
  */
 public class ApplyActionsInstructionDeserializer extends AbstractActionInstructionDeserializer
         implements HeaderDeserializer<Instruction> {
 
     @Override
     public Instruction deserialize(ByteBuf input) {
-        InstructionBuilder builder = new InstructionBuilder();
+        final InstructionBuilder builder = new InstructionBuilder();
         input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         int instructionLength = input.readUnsignedShort();
         input.skipBytes(InstructionConstants.PADDING_IN_ACTIONS_INSTRUCTION);
index 24fe5cfba769c82c0d0accbe117a346f09675f35..dfbba719e66ffd0422f62e5b03aae03020866651 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
@@ -19,8 +18,9 @@ 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.InstructionBuilder;
 
 /**
- * @author michal.polkorab
+ * Deserializer for clear actions instructions.
  *
+ * @author michal.polkorab
  */
 public class ClearActionsInstructionDeserializer implements OFDeserializer<Instruction>,
         HeaderDeserializer<Instruction> {
@@ -41,4 +41,4 @@ public class ClearActionsInstructionDeserializer implements OFDeserializer<Instr
         builder.setInstructionChoice(new ClearActionsCaseBuilder().build());
         return builder.build();
     }
-}
\ No newline at end of file
+}
index 31191b1d70478398c586414192c7ea0f5a53d691..d58f1a58296060ae78bf9dfe2f57b17097662f46 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
@@ -20,15 +19,16 @@ 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.InstructionBuilder;
 
 /**
- * @author michal.polkorab
+ * Deserializer for goto table instructions.
  *
+ * @author michal.polkorab
  */
 public class GoToTableInstructionDeserializer  implements OFDeserializer<Instruction>,
         HeaderDeserializer<Instruction> {
 
     @Override
     public Instruction deserialize(ByteBuf input) {
-        InstructionBuilder builder = new InstructionBuilder();
+        final InstructionBuilder builder = new InstructionBuilder();
         GotoTableCaseBuilder caseBuilder = new GotoTableCaseBuilder();
         GotoTableBuilder instructionBuilder = new GotoTableBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
index 4667a4d8fa78babf40afe704b4d52bd09d48e7f6..25b0b514eacc16a62d09cbc04cc99df66717c195 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
@@ -19,15 +18,16 @@ 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.InstructionBuilder;
 
 /**
- * @author michal.polkorab
+ * Deserializer for meter instructions.
  *
+ * @author michal.polkorab
  */
 public class MeterInstructionDeserializer implements OFDeserializer<Instruction>,
         HeaderDeserializer<Instruction> {
 
     @Override
     public Instruction deserialize(ByteBuf input) {
-        InstructionBuilder builder = new InstructionBuilder();
+        final InstructionBuilder builder = new InstructionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         MeterCaseBuilder caseBuilder = new MeterCaseBuilder();
         MeterBuilder instructionBuilder = new MeterBuilder();
index 4699ef69949aeb7f5fce529031300bc1e37a34e0..e54c1a948afdc02495ff3a7e5dd53a8a26f67c89 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
@@ -19,15 +18,16 @@ 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.InstructionBuilder;
 
 /**
- * @author michal.polkorab
+ * Deserializer for write actions instructions.
  *
+ * @author michal.polkorab
  */
 public class WriteActionsInstructionDeserializer extends AbstractActionInstructionDeserializer
         implements HeaderDeserializer<Instruction> {
 
     @Override
     public Instruction deserialize(ByteBuf input) {
-        InstructionBuilder builder = new InstructionBuilder();
+        final InstructionBuilder builder = new InstructionBuilder();
         input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         int instructionLength = input.readUnsignedShort();
         input.skipBytes(InstructionConstants.PADDING_IN_ACTIONS_INSTRUCTION);
index 919fc50d2a24ffdfa1ff3e6d3006482b590298d8..5cd96423a6c02d01d9be02881dfba861990f214c 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.openflowjava.protocol.impl.deserialization.instruction;
 
 import io.netty.buffer.ByteBuf;
-
 import org.opendaylight.openflowjava.protocol.api.extensibility.HeaderDeserializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
@@ -20,18 +19,19 @@ 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.InstructionBuilder;
 
 /**
- * @author michal.polkorab
+ * Deserializer for write metadata instructions.
  *
+ * @author michal.polkorab
  */
 public class WriteMetadataInstructionDeserializer implements OFDeserializer<Instruction>,
         HeaderDeserializer<Instruction> {
 
     @Override
     public Instruction deserialize(ByteBuf input) {
-        InstructionBuilder builder = new InstructionBuilder();
+        final InstructionBuilder builder = new InstructionBuilder();
         input.skipBytes(2 * EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
         input.skipBytes(InstructionConstants.PADDING_IN_WRITE_METADATA);
-        WriteMetadataCaseBuilder caseBuilder = new WriteMetadataCaseBuilder();
+        final WriteMetadataCaseBuilder caseBuilder = new WriteMetadataCaseBuilder();
         WriteMetadataBuilder metadataBuilder = new WriteMetadataBuilder();
         byte[] metadata = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         input.readBytes(metadata);