lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3633) Remove code duplication in MultiReader/DirectoryReader, make everything inside final
Date Sat, 10 Dec 2011 18:55:39 GMT


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

> Remove code duplication in MultiReader/DirectoryReader, make everything inside final
> ------------------------------------------------------------------------------------
>                 Key: LUCENE-3633
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message