This is an automated email from the ASF dual-hosted git repository.

rmaucher pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 3a8c48f1d756b42be225ca32ffa4dc1651e72a4e
Author: opencode <[email protected]>
AuthorDate: Tue Oct 20 13:28:54 2026 +0200

    Log the Txt2Html converted file count once per task with the correct total
    
    The converted file counter was declared before the fileset loop but the
    'Converted N files to <todir>' message was logged at the end of each
    fileset iteration. Every build.xml usage configures several filesets
    with a single todir, so the message was printed once per fileset with
    an ever-growing cumulative count that overstated the number of files
    converted by the later filesets. Move the summary log after the fileset
    loop so it is emitted once per task with the total. Also close the
    unbalanced quote in the per-file verbose log message.
---
 java/org/apache/tomcat/buildutil/Txt2Html.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/buildutil/Txt2Html.java 
b/java/org/apache/tomcat/buildutil/Txt2Html.java
index 06d89f8243..60a3c46ddd 100644
--- a/java/org/apache/tomcat/buildutil/Txt2Html.java
+++ b/java/org/apache/tomcat/buildutil/Txt2Html.java
@@ -102,7 +102,7 @@ public class Txt2Html extends Task {
                 File from = new File(basedir, file);
                 File to = new File(todir, file + ".html");
                 if (!to.exists() || (from.lastModified() > to.lastModified())) 
{
-                    log("Converting file '" + from.getAbsolutePath() + "' to 
'" + to.getAbsolutePath(),
+                    log("Converting file '" + from.getAbsolutePath() + "' to 
'" + to.getAbsolutePath() + "'",
                             Project.MSG_VERBOSE);
                     try {
                         convert(from, to);
@@ -114,9 +114,9 @@ public class Txt2Html extends Task {
                     count++;
                 }
             }
-            if (count > 0) {
-                log("Converted " + count + " file" + (count > 1 ? "s" : "") + 
" to " + todir.getAbsolutePath());
-            }
+        }
+        if (count > 0) {
+            log("Converted " + count + " file" + (count > 1 ? "s" : "") + " to 
" + todir.getAbsolutePath());
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to