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

Daniel Jelinski updated LUCENE-7743:
------------------------------------
    Attachment: LUCENE-7743.patch

The patch addresses the obvious cases, i.e. all cases in non-test code, and 
tests where the string copy is immediately discarded, or where string identity 
is not likely to be of concern.
I left a few cases that looked like they might be implicitly testing 
non-interned strings.
Note that the removed comment in SolrDefaultHighlighter no longer holds (at 
least in OpenJDK and Oracle Java); see 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-May/010257.html for 
details.

> Findbugs: avoid new String(String)
> ----------------------------------
>
>                 Key: LUCENE-7743
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7743
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Daniel Jelinski
>            Priority: Minor
>         Attachments: LUCENE-7743.patch
>
>
> http://findbugs.sourceforge.net/bugDescriptions.html#DM_STRING_CTOR
> Removing the extra constructor calls will avoid heap allocations while 
> behaving just the same as the original code.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to