ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bodewig <...@git.apache.org>
Subject [GitHub] ant pull request #58: Use StringBuilder instead of StringBuffer as it offers...
Date Tue, 06 Feb 2018 08:27:43 GMT
Github user bodewig commented on a diff in the pull request:

    https://github.com/apache/ant/pull/58#discussion_r166216151
  
    --- Diff: src/main/org/apache/tools/ant/listener/MailLogger.java ---
    @@ -102,7 +102,7 @@
         private static final String DEFAULT_MIME_TYPE = "text/plain";
     
         /** Buffer in which the message is constructed prior to sending */
    -    private StringBuffer buffer = new StringBuffer();
    +    private StringBuilder buffer = new StringBuilder();
    --- End diff --
    
    Given the `parallel` task and things like our execute framework that spawns new threads,
loggers need to be thread safe, But to be honest I don't think we've ever verified `MailLogger`
actually is.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message