From 667a34d7aa343829efb5f7c1bc30faa4b260ad89 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 14 Jul 2022 09:28:26 +0800 Subject: [PATCH] Remove repeated conditional test (#8732) --- .../main/java/com/alibaba/nacos/common/utils/StringUtils.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/src/main/java/com/alibaba/nacos/common/utils/StringUtils.java b/common/src/main/java/com/alibaba/nacos/common/utils/StringUtils.java index ad4d93553a2..3418b625658 100644 --- a/common/src/main/java/com/alibaba/nacos/common/utils/StringUtils.java +++ b/common/src/main/java/com/alibaba/nacos/common/utils/StringUtils.java @@ -192,9 +192,7 @@ public static String join(Collection collection, String separator) { if (objects[i] != null) { stringBuilder.append(objects[i]); if (i != collection.size() - 1 && separator != null) { - if (separator != null) { - stringBuilder.append(separator); - } + stringBuilder.append(separator); } } }