From 0cbbac90bcc49d22a8c8a0db7f87a2b2645ff9c8 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 4 Apr 2020 13:03:45 +0200 Subject: [PATCH] sinttest: use StringUtils.appendTo(Collection, StringBuilder) --- .../smack/inttest/SmackIntegrationTestFramework.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java index cc1cf1944..b7c66f3c6 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java @@ -33,6 +33,7 @@ import java.lang.reflect.Type; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -728,13 +729,8 @@ public class SmackIntegrationTestFramework { .append(method.getName()) .append(" (") .append(testType.name()); - final String SUBDESCRIPTION_DELIMITER = ", "; - sb.append(SUBDESCRIPTION_DELIMITER); - - for (String subdescripton : subdescriptons) { - sb.append(subdescripton).append(SUBDESCRIPTION_DELIMITER); - } - sb.setLength(sb.length() - SUBDESCRIPTION_DELIMITER.length()); + sb.append(", "); + StringUtils.appendTo(Arrays.asList(subdescriptons), sb); sb.append(')'); stringCache = sb.toString();