BUG-612 : switched PCEP XRO subobject serializers to ByteBuf
[bgpcep.git] / pcep / impl / src / main / java / org / opendaylight / protocol / pcep / impl / object / PCEPExcludeRouteObjectParser.java
index 8a6ca0bb996a13e941e8fe5391d46e22cd815c40..cff7277677d8525497a61692c0db72422e285da6 100644 (file)
@@ -57,9 +57,7 @@ public final class PCEPExcludeRouteObjectParser extends AbstractXROWithSubobject
         if (obj.getFlags().isFail() != null) {
             body.writeBoolean(obj.getFlags().isFail());
         }
-        // FIXME: switch to ByteBuf
-        final byte[] bytes = serializeSubobject(obj.getSubobject());
-        body.writeBytes(bytes);
+        serializeSubobject(obj.getSubobject(), body);
         ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), body, buffer);
     }
 }