From afc8a4633b0a43173dc0bdba5f678148ae7e58a7 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 31 Oct 2017 08:50:10 +0100 Subject: Adapt to mac address representation change in l2.api https://gerrit.fd.io/r/#/c/9090/ changes mac representation from u64 to u8[] Change-Id: Ia82d5652926f8bd10c1c8fc3ad0e147b35dbee4c Signed-off-by: Marek Gradzki --- .../io/fd/hc2vpp/common/translate/util/ByteDataTranslator.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'vpp-common') diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/ByteDataTranslator.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/ByteDataTranslator.java index c7583fb52..25b8d50f0 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/ByteDataTranslator.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/ByteDataTranslator.java @@ -100,14 +100,10 @@ public interface ByteDataTranslator { default String printHexBinary(@Nonnull final byte[] bytes) { Objects.requireNonNull(bytes, "bytes array should not be null"); - return printHexBinary(bytes, 0, bytes.length); - } - - default String printHexBinary(@Nonnull final byte[] bytes, final int startIndex, final int endIndex) { StringBuilder str = new StringBuilder(); - Impl.appendHexByte(str, bytes[startIndex]); - for (int i = startIndex + 1; i < endIndex; i++) { + Impl.appendHexByte(str, bytes[0]); + for (int i = 1; i < bytes.length; i++) { str.append(":"); Impl.appendHexByte(str, bytes[i]); } -- cgit 1.2.3-korg