There is a single caller, which can trivially be updated to use
ByteBufUtils with improved efficiency.
Change-Id: I7f636cfc1d7ecb6922bd5e29026d4137783baeba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.protocol.bgp.route.targetcontrain.impl.nlri;
package org.opendaylight.protocol.bgp.route.targetcontrain.impl.nlri;
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
-
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.util.ArrayList;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import java.util.ArrayList;
nlri.writeByte(RT_BITS_LENGTH);
final AsNumber originAs = dest.getOriginAs();
if (originAs != null) {
nlri.writeByte(RT_BITS_LENGTH);
final AsNumber originAs = dest.getOriginAs();
if (originAs != null) {
- writeUnsignedInt(originAs.getValue(), nlri);
+ ByteBufUtils.write(nlri, originAs.getValue());
}
nlri.writeBytes(SimpleRouteTargetConstrainNlriRegistry.getInstance()
.serializeRouteTargetConstrain(rtcChoice));
}
nlri.writeBytes(SimpleRouteTargetConstrainNlriRegistry.getInstance()
.serializeRouteTargetConstrain(rtcChoice));