You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2012/11/26 16:04:58 UTC

[jira] [Resolved] (LANG-835) StrBuilder should support StringBuilder as an input parameter

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

Gary Gregory resolved LANG-835.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2

{noformat}
commit -m "<action issue="LANG-835" type="add">StrBuilder should support StringBuilder as an input parameter</action>" C:/svn/org/apache/commons/trunks-proper/lang/src/test/java/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/text/StrBuilder.java C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/test/java/org/apache/commons/lang3/text/StrBuilderAppendInsertTest.java
    Transmitting file data ...
    Committed revision 1413671.
{noformat}
                
> StrBuilder should support StringBuilder as an input parameter
> -------------------------------------------------------------
>
>                 Key: LANG-835
>                 URL: https://issues.apache.org/jira/browse/LANG-835
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.text.*
>         Environment: Although StrBuilder supports CharSequence (and thus StringBuilder), it does so by converting it to a String temporarily. This is a bit wasteful.
> It would be useful to support StringBuilder directly, as that provides the getChars() method which does a direct copy of the buffer contents.
> This would involve adding two new methods:
> getChars(StringBuilder)
> getChars(StringBuilder, int, int)
> which can be a direct copy of the StringBuffer methods.
> Sadly there is no accessible interface or super-class that would allow the methods to share code.
>            Reporter: Sebb
>             Fix For: 3.2
>
>         Attachments: LANG-835.diff
>
>


--
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