Reduce use of Util.writeShortest() 06/86706/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 5 Jan 2020 09:32:14 +0000 (10:32 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 5 Jan 2020 09:32:14 +0000 (10:32 +0100)
commit5189ff2b47b21310b7bacf22c49413da4a306eb8
tree2d02c1e89786d8ac9cace6eb8190c5f8aca2166d
parentb62b2295f3ed9f666ec17364734f7366034ebda0
Reduce use of Util.writeShortest()

In case we are coming from an Uint8 there really is no point in
going through Util.writeShortest() as the result is always going
to fit in a single byte. Use ByteBufUtils directly to emit that
byte.

Change-Id: I40288d3fa3c149e8effa0fe1c2c8de52f19eeb79
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/extensions/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/FSDscpHandler.java
bgp/extensions/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/handlers/NumericOneByteOperandParser.java