Avoid string concatenation inside StringBuilder append()
See gh-15589
This commit is contained in:
committed by
Stephane Nicoll
parent
1b970b0ece
commit
59ac85d371
@@ -108,7 +108,7 @@ public final class Metadata {
|
||||
|
||||
private String createDescription() {
|
||||
StringBuilder description = new StringBuilder();
|
||||
description.append("an item named '" + this.name + "'");
|
||||
description.append("an item named '").append(this.name).append("'");
|
||||
if (this.type != null) {
|
||||
description.append(" with dataType:").append(this.type);
|
||||
}
|
||||
@@ -258,7 +258,7 @@ public final class Metadata {
|
||||
|
||||
private String createDescription() {
|
||||
StringBuilder description = new StringBuilder();
|
||||
description.append("a hints name '" + this.name + "'");
|
||||
description.append("a hints name '").append(this.name).append("'");
|
||||
if (!this.valueConditions.isEmpty()) {
|
||||
description.append(" with values:").append(this.valueConditions);
|
||||
}
|
||||
@@ -348,7 +348,7 @@ public final class Metadata {
|
||||
|
||||
private String createDescription() {
|
||||
StringBuilder description = new StringBuilder();
|
||||
description.append("value hint at index '" + this.index + "'");
|
||||
description.append("value hint at index '").append(this.index).append("'");
|
||||
if (this.value != null) {
|
||||
description.append(" with value:").append(this.value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user