Creating a single-byte array is not needed here.
Change-Id: I518419438d6eae6146616fba0725245fc348fee7
Signed-off-by: Robert Varga <rovarga@cisco.com>
final List<Ipv4Prefix> list = Lists.newArrayList();
int byteOffset = 0;
while (byteOffset < bytes.length) {
- final int bitLength = UnsignedBytes.toInt(ByteArray.subByte(bytes, byteOffset, 1)[0]);
+ final int bitLength = UnsignedBytes.toInt(bytes[byteOffset]);
byteOffset += 1;
// if length == 0, default route will be added
if (bitLength == 0) {
final List<Ipv6Prefix> list = Lists.newArrayList();
int byteOffset = 0;
while (byteOffset < bytes.length) {
- final int bitLength = UnsignedBytes.toInt(ByteArray.subByte(bytes, byteOffset, 1)[0]);
+ final int bitLength = UnsignedBytes.toInt(bytes[byteOffset]);
byteOffset += 1;
// if length == 0, default route will be added
if (bitLength == 0) {