From 83b9c48f0aead8b6c54d7ec9b5661b9f470f8859 Mon Sep 17 00:00:00 2001 From: "In-on W." <60760464+inonwir@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:25:19 +0700 Subject: [PATCH] Update HexFormatUtil.java Add Null Check --- src/main/java/com/actiontech/dble/util/HexFormatUtil.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/actiontech/dble/util/HexFormatUtil.java b/src/main/java/com/actiontech/dble/util/HexFormatUtil.java index 364d38870b..6b025d011c 100644 --- a/src/main/java/com/actiontech/dble/util/HexFormatUtil.java +++ b/src/main/java/com/actiontech/dble/util/HexFormatUtil.java @@ -17,6 +17,9 @@ private HexFormatUtil() { private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray(); public static String bytesToHexString(byte[] bytes) { + if (bytes == null) { + return null; + } char[] hexChars = new char[bytes.length * 2]; for (int j = 0; j < bytes.length; j++) { int v = bytes[j] & 0xFF;