Optimize some StringBuilder.append() calls

Closes gh-13961
This commit is contained in:
dreis2211
2018-07-31 19:45:10 +02:00
committed by Stephane Nicoll
parent d31f68380a
commit 66b1742f96
8 changed files with 30 additions and 15 deletions

View File

@@ -230,7 +230,9 @@ abstract class ArchiveCommand extends OptionParsingCommand {
private String commaDelimitedClassNames(Class<?>[] classes) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < classes.length; i++) {
builder.append((i != 0) ? "," : "");
if (i != 0) {
builder.append(',');
}
builder.append(classes[i].getName());
}
return builder.toString();