[
https://issues.apache.org/jira/browse/LUCENE-7915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16108872#comment-16108872
]
David Smiley commented on LUCENE-7915:
--------------------------------------
bq. +1, feel free to just commit such nice code improvements w/o opening an
issue.
It's nice to hear this sentiment. I've felt this way many times when I see
trivial refactorings -- typically that my IDE suggests. But I've not done so
because I figured we were more adamant about the JIRA process here. I'll go
ahead and commit when I see little refactoring improvements then. There's
still the pain of back-porting as an impediment though.
> Avoid looping over merge segments in best merge selection
> ---------------------------------------------------------
>
> Key: LUCENE-7915
> URL: https://issues.apache.org/jira/browse/LUCENE-7915
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/index
> Reporter: Tommaso Teofili
> Assignee: Tommaso Teofili
> Priority: Trivial
> Fix For: trunk, 7.1
>
>
> With java 8 we can trivially avoid looping over merge segments to be merged,
> switching from
> {code}
> for(SegmentCommitInfo info : merge.segments) {
> toBeMerged.add(info);
> }
> {code}
> to :
> {code}
> toBeMerged.addAll(merge.segments);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]