You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2011/01/10 01:17:46 UTC

[jira] Updated: (LANG-302) StrBuilder does not implement clone()

     [ https://issues.apache.org/jira/browse/LANG-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton updated LANG-302:
---------------------------------

    Attachment: LANG-302-clone.patch

I know this is resolved for 3.0 - but Sebb raised this again concerning a 2.6 release (also LANG-603):
    * http://markmail.org/message/qa42zi27j4svsuna

I agree with Stephen that we can't remove Cloneable in the 2.x branch because of compatibility issues. IMO the best solution is to implement clone(). As it stands this implementation is breaking the contract of Cloneable and I think that is worse than any difference with StringBuilder or StringBuffer. Its also very trivial to implement.

Attaching a patch to implement clone

> StrBuilder does not implement clone()
> -------------------------------------
>
>                 Key: LANG-302
>                 URL: https://issues.apache.org/jira/browse/LANG-302
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.text.*
>    Affects Versions: 2.2
>            Reporter: Henri Yandell
>             Fix For: 3.0
>
>         Attachments: LANG-302-clone.patch
>
>
> As reported by FindBugs.
> Does StrBuilder need to be Cloneable?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.