Replaced usage of BytebufUtils.padBuffer() as it is deprecated
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / PortModInputMessageFactory.java
index 72b0d8bd98abfd293c8145b1e461d26d17bfe2aa..65364aeb95968efaba2a96ff4cf4789b763dc213 100644 (file)
@@ -35,13 +35,13 @@ public class PortModInputMessageFactory implements OFSerializer<PortModInput> {
     public void serialize(final PortModInput message, final ByteBuf outBuffer) {
         ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH);
         outBuffer.writeInt(message.getPortNo().getValue().intValue());
-        ByteBufUtils.padBuffer(PADDING_IN_PORT_MOD_MESSAGE_01, outBuffer);
+        outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_01);
         outBuffer.writeBytes(ByteBufUtils.macAddressToBytes(message.getHwAddress().getValue()));
-        ByteBufUtils.padBuffer(PADDING_IN_PORT_MOD_MESSAGE_02, outBuffer);
+        outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_02);
         outBuffer.writeInt(createPortConfigBitmask(message.getConfig()));
         outBuffer.writeInt(createPortConfigBitmask(message.getMask()));
         outBuffer.writeInt(createPortFeaturesBitmask(message.getAdvertise()));
-        ByteBufUtils.padBuffer(PADDING_IN_PORT_MOD_MESSAGE_03, outBuffer);
+        outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_03);
         ByteBufUtils.updateOFHeaderLength(outBuffer);
     }