[
https://issues.apache.org/jira/browse/LANG-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464826#comment-13464826
]
Shevek commented on LANG-833:
-----------------------------
The point of using StringBuilder is twofold: Firstly for performance; whoever
needed a threadsafe toString method, and anybody who does can synchronize
themselves. It's not as if synchronization within ToStringBuilder is capable of
guarding access to an instance variable.
Secondly, for compatibility with existing APIs which are capable of appending
to a java.lang.StringBuilder, which is the majority, these days. That's the
killer for me.
> ToStringBuilder should use StringBuilder
> ----------------------------------------
>
> Key: LANG-833
> URL: https://issues.apache.org/jira/browse/LANG-833
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.1
> Reporter: Shevek
>
> Rewriting as lang3 but still using StringBuffer (synchronized) looks like a
> missed opportunity. Please use StringBuilder.
> Suggest audit for uses of StringBuffer in lang3 overall. No cause for it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira