summaryrefslogtreecommitdiffstats
path: root/vpp-common
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-common')
-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]);
}