You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/01/06 00:05:50 UTC

[jira] [Commented] (LUCENE-5372) Replace StringBuffer with StringBuilder where possible, add to forbidden-apis

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

ASF subversion and git services commented on LUCENE-5372:
---------------------------------------------------------

Commit 1555645 from [~thetaphi] in branch 'dev/trunk'
[ https://svn.apache.org/r1555645 ]

LUCENE-5372: Replace StringBuffer by StringBuilder, where possible

> Replace StringBuffer with StringBuilder where possible, add to forbidden-apis
> -----------------------------------------------------------------------------
>
>                 Key: LUCENE-5372
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5372
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>            Reporter: Joshua Hartman
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 5.0, 4.7
>
>         Attachments: 5372-lucene5339.patch, 5372-v2.patch, 5372.patch, LUCENE-5372-StringBuffer.patch, LUCENE-5372-forbidden.patch
>
>
> This is pretty minor, but I found a few issues with the toString implementations while looking through the facet data structures.
> The most egregious is the use of string concatenation in the IntArray class. I have fixed that using StringBuilders. I also noticed that other classes were using StringBuffer instead of StringBuilder. According to the javadoc,
> "This class is designed for use as a drop-in replacement for StringBuffer in places where the string buffer was being used by a single thread (as is generally the case). Where possible, it is recommended that this class be used in preference to StringBuffer as it will be faster under most implementations."



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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