summaryrefslogtreecommitdiffstats
path: root/vpp-common/vpp-translate-utils/src
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-10-31 08:50:10 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-10-31 16:58:35 +0000
commitafc8a4633b0a43173dc0bdba5f678148ae7e58a7 (patch)
treede1b55303f72770eecabc32ab0146a3d7a0a988d /vpp-common/vpp-translate-utils/src
parent5577ff50e82bbd771bcdb088e1f08e2bfd940b2a (diff)
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 <mgradzki@cisco.com>
Diffstat (limited to 'vpp-common/vpp-translate-utils/src')
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/ByteDataTranslator.java8
1 files changed, 2 insertions, 6 deletions
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]);
}