Avoid string concatenation inside StringBuilder append()

See gh-15589
This commit is contained in:
igor-suhorukov
2018-12-30 22:34:02 +03:00
committed by Stephane Nicoll
parent 1b970b0ece
commit 59ac85d371
12 changed files with 45 additions and 42 deletions

View File

@@ -52,11 +52,11 @@ class UnresolvedDependenciesAnalyzer {
StringBuilder message = new StringBuilder();
message.append("\nDuring the build, one or more dependencies that were "
+ "declared without a version failed to resolve:\n");
this.dependenciesWithNoVersion
.forEach((dependency) -> message.append(" " + dependency + "\n"));
this.dependenciesWithNoVersion.forEach((dependency) -> message.append(" ")
.append(dependency).append("\n"));
message.append("\nDid you forget to apply the "
+ "io.spring.dependency-management plugin to the " + project.getName()
+ " project?\n");
+ "io.spring.dependency-management plugin to the ");
message.append(project.getName()).append(" project?\n");
logger.warn(message.toString());
}
}