From ea9ea4284fedacd2270541646e74cdf6d3fb6f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9C=B0=E5=B9=B3=E7=BA=BF?= <22250530@qq.com> Date: Mon, 31 Aug 2015 16:25:06 +0800 Subject: [PATCH] --- src/com/wentch/redkale/util/Utility.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/wentch/redkale/util/Utility.java b/src/com/wentch/redkale/util/Utility.java index 708d60026..0d14d9764 100644 --- a/src/com/wentch/redkale/util/Utility.java +++ b/src/com/wentch/redkale/util/Utility.java @@ -79,11 +79,13 @@ public final class Utility { if (bytes == null) return; StringBuilder sb = new StringBuilder(); sb.append(bytes.length).append(".["); + boolean last = false; for (byte b : bytes) { - if (sb.length() > 1) sb.append(','); + if (last) sb.append(','); int v = b & 0xff; if (v < 16) sb.append('0'); sb.append(Integer.toHexString(v)); + last = true; } sb.append(']'); (System.out).println(sb);