ant-dev mailing list archives

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

    https://github.com/apache/ant/pull/58#discussion_r166183611
  
    --- 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 --
    
    I'm not too sure this change here, in this class is correct. The `StringBuffer` is a thread-safe
class whereas the `StringBuilder` isn't. Having said that I haven't checked yet whether MailLogger
class is expected to be thread safe nor have I checked its usage thoroughly.


---

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


Mime
View raw message