You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2013/08/23 15:11:52 UTC
[jira] [Commented] (LUCENE-5187) Make SlowCompositeReaderWrapper
constructor private
[ https://issues.apache.org/jira/browse/LUCENE-5187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13748521#comment-13748521 ]
Robert Muir commented on LUCENE-5187:
-------------------------------------
+1
In the case of grouping tests, is it really safe to change this way?
{noformat}
// NOTE: intentional but temporary field cache insanity!
- final FieldCache.Ints docIdToFieldId = FieldCache.DEFAULT.getInts(new SlowCompositeReaderWrapper(r), "id", false);
+ final FieldCache.Ints docIdToFieldId = FieldCache.DEFAULT.getInts(SlowCompositeReaderWrapper.wrap(r), "id", false);
{noformat}
if needed, Maybe instead, we should force compositeness by e.g. inserting an empty reader if necessary or whatever. but i'm not even sure what this test is doing.
> Make SlowCompositeReaderWrapper constructor private
> ---------------------------------------------------
>
> Key: LUCENE-5187
> URL: https://issues.apache.org/jira/browse/LUCENE-5187
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-5187.patch
>
>
> I found a couple of places in the code base that duplicate the logic of SlowCompositeReaderWrapper.wrap. I think {{SlowCompositeReaderWrapper.wrap}} (vs. new SlowCompositeReaderWrapper) is what users need so we should probably make SlowCompositeReaderWrapper constructor private to enforce usage of {{wrap}}.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org