You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "dk2k (via GitHub)" <gi...@apache.org> on 2023/04/08 10:47:19 UTC

[GitHub] [camel] dk2k commented on a diff in pull request #9828: Optimization of loops with the only action of appending a string several times

dk2k commented on code in PR #9828:
URL: https://github.com/apache/camel/pull/9828#discussion_r1161096578


##########
catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java:
##########
@@ -503,9 +503,7 @@ private static void gatherRouteCoverageSummary(
 
     private static String padString(int level) {
         StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < level; i++) {
-            sb.append("  ");
-        }
+        sb.append("  ".repeat(Math.max(0, level)));

Review Comment:
   it should. And the StringBuilder isn't necessary after the loop gor removed. So it will be at least one more commit here.
   It was just the automated substitution - to be on the safe side



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org