Optional fields - reverted
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / util / ActionsSerializer.java
index e99d204cb929558794d11a0f62ad60b857d690a1..7adcf552c5f697d30dbcf40ce9b4e638c67bf1f8 100644 (file)
@@ -239,13 +239,9 @@ public abstract class ActionsSerializer {
         final byte LENGTH_OF_ETHERTYPE_ACTION = 8;\r
         final byte ETHERTYPE_ACTION_PADDING = 2;        \r
         EthertypeAction ethertype = action.getAugmentation(EthertypeAction.class);\r
-        \r
-        if (null != ethertype && null != ethertype.getEthertype()) {\r
-            outBuffer.writeShort(LENGTH_OF_ETHERTYPE_ACTION);\r
-            \r
-            outBuffer.writeShort(ethertype.getEthertype().getValue());\r
-            ByteBufUtils.padBuffer(ETHERTYPE_ACTION_PADDING, outBuffer);\r
-        }\r
+        outBuffer.writeShort(LENGTH_OF_ETHERTYPE_ACTION);\r
+        outBuffer.writeShort(ethertype.getEthertype().getValue());\r
+        ByteBufUtils.padBuffer(ETHERTYPE_ACTION_PADDING, outBuffer);\r
     }\r
     \r
     /**\r