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 (Commented) (JIRA)" <ji...@apache.org> on 2011/12/10 19:55:39 UTC

[jira] [Commented] (LUCENE-3633) Remove code duplication in MultiReader/DirectoryReader, make everything inside final

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

Robert Muir commented on LUCENE-3633:
-------------------------------------

+1, i was just looking at this duplication myself when looking at the docvalues case (its message about use Multi*/SlowMultiReaderWrapper* is actually wrong, and duplicated in both readers).



                
> Remove code duplication in MultiReader/DirectoryReader, make everything inside final
> ------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3633
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3633
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.0
>
>         Attachments: LUCENE-3633.patch, LUCENE-3633.patch
>
>
> After making IndexReader readOnly (LUCENE-3606) there is no need to have completely different DirectoryReader and MultiReader, the current code is heavy code duplication and violations against finalness patterns. There are only few differences in reopen and things like isCurrent/getDirectory/...
> This issue will clean this up by introducing a hidden package-private base class for both and only handling reopen and incRef/decRef different. DirectoryReader is now final and all fields in BaseMultiReader, MultiReader and DirectoryReader are final now. DirectoryReader has now only static factories, no public ctor anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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