commit | 343acf530ca293f624fb70cc5710dac5a5933890 | [log] [tgz] |
---|---|---|
author | Lars Vogel <Lars.Vogel@vogella.com> | Fri Apr 09 13:25:29 2021 +0200 |
committer | Lars Vogel <Lars.Vogel@vogella.com> | Fri May 07 04:25:24 2021 -0400 |
tree | 56cfca5f0565df24017b2575179951225c2778d7 | |
parent | 05dfdc60e681e89e0c66e0f30f1557e084c4fd7d [diff] |
[dogfooding] Use String.join JDT cleanup in p2 The resulting code is much shorter. Change-Id: I1b5e6a59b1cc236c273e8005c174ef6bdf393341 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/179100 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java index d9a7e9c..d24dbc3 100644 --- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java +++ b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
@@ -290,13 +290,8 @@ } public static String concat(String[] array) { - StringBuilder buffer = new StringBuilder(); - for (int i = 0; i < array.length; i++) { - if (i > 0) - buffer.append(' '); - buffer.append(array[i]); - } - return buffer.toString(); + String buffer = String.join(String.valueOf(' '), array); + return buffer; } public static String[] toStringArray(String input, String separator) {