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

@@ -63,9 +63,11 @@ public final class ItemMetadata implements Comparable<ItemMetadata> {
}
StringBuilder fullName = new StringBuilder((prefix != null) ? prefix : "");
if (fullName.length() > 0 && name != null) {
fullName.append(".");
fullName.append('.');
}
if (name != null) {
fullName.append(ConfigurationMetadata.toDashedCase(name));
}
fullName.append((name != null) ? ConfigurationMetadata.toDashedCase(name) : "");
return fullName.toString();
}