From f53c73c9d5c7d05e165a40a0d3759520603127f6 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Tue, 10 Oct 2023 11:55:38 -0400 Subject: [PATCH] Revert "Fixed excessive String concatenations in loop" This reverts commit 7009e54c7113943b435de9644e7e0b129c2def98. --- .../java/rife/bld/operations/AbstractCreateOperation.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/rife/bld/operations/AbstractCreateOperation.java b/src/main/java/rife/bld/operations/AbstractCreateOperation.java index eafc699..ec5a23d 100644 --- a/src/main/java/rife/bld/operations/AbstractCreateOperation.java +++ b/src/main/java/rife/bld/operations/AbstractCreateOperation.java @@ -220,17 +220,13 @@ protected void executePopulateProjectStructure() for (var entry : project_.dependencies().entrySet()) { build_template.blankValue("dependencies"); - var version_string = new StringBuilder(0); for (var dependency : entry.getValue()) { build_template.setValue("groupId", dependency.groupId()); build_template.setValue("artifactId", dependency.artifactId()); var version = dependency.version(); - version_string.setLength(0); - version_string.append(version.major()).append(',') - .append(version.minor()).append(',') - .append(version.revision()); + var version_string = version.major() + "," + version.minor() + "," + version.revision(); if (!version.qualifier().isEmpty()) { - version_string.append(",\"" ).append(version.qualifier()).append('"'); + version_string += ",\"" + version.qualifier() + "\""; } build_template.setValue("version", version_string); build_template.appendBlock("dependencies", "dependency");