commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-833) ToStringBuilder should use StringBuilder
Date Thu, 27 Sep 2012 16:30:07 GMT

    [ https://issues.apache.org/jira/browse/LANG-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13464850#comment-13464850
] 

Sebb commented on LANG-833:
---------------------------

Actually, one cannot use AbstractStringBuilder as that is not visible.

The problem is twofold:
- there's no suitable common interface or class for StringBuilder and StringBuffer
- changing to use StringBuilder would break compatibility, and might cause some applications
that rely on the sync. to fail

I don't see how it's possible to use StringBuilder without either:
- breaking compatibility and some apps, OR
- duplicating the API
                
> 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

Mime
View raw message