From 367984f063575b41948fdb2bed385b44514d3f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=A2=A6=E6=8A=80=E6=9C=AF?= <596392912@qq.com> Date: Wed, 2 Mar 2022 19:44:28 +0800 Subject: [PATCH] =?UTF-8?q?StringUtils=20=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/smartboot/socket/util/StringUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aio-pro/src/main/java/org/smartboot/socket/util/StringUtils.java b/aio-pro/src/main/java/org/smartboot/socket/util/StringUtils.java index 5d8ddd92..f4ccf3b2 100644 --- a/aio-pro/src/main/java/org/smartboot/socket/util/StringUtils.java +++ b/aio-pro/src/main/java/org/smartboot/socket/util/StringUtils.java @@ -57,7 +57,7 @@ public class StringUtils { startIndex = i; buffer.append(fixHexString(Integer.toHexString(i), 8)).append(": "); buffer.append(toHex(bytes[i])); - buffer.append(" "); + buffer.append(' '); break; case 15: buffer.append(toHex(bytes[i])); @@ -67,7 +67,7 @@ public class StringUtils { break; default: buffer.append(toHex(bytes[i])); - buffer.append(" "); + buffer.append(' '); } } if (column != 15) { @@ -110,12 +110,12 @@ public class StringUtils { if (hexStr == null || hexStr.length() == 0) { return "00000000h"; } else { - final StringBuffer buf = new StringBuffer(length); + final StringBuilder buf = new StringBuilder(length); final int strLen = hexStr.length(); for (int i = 0; i < length - strLen; i++) { - buf.append("0"); + buf.append('0'); } - buf.append(hexStr).append("h"); + buf.append(hexStr).append('h'); return buf.toString(); } } -- Gitee