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-3464) Rename IndexReader.reopen to make it clear that reopen may not happen
Date Mon, 21 Nov 2011 20:32:51 GMT


Robert Muir commented on LUCENE-3464:

Not in your proof of concept. And this proof of concept is no proof as it modifies FilteredIndexReader,
so it would not work with 3.5.0RC1.

I'm not arguing that nothing needs to be done: I'm just saying that the fact its protected
isnt really a problem.

For 3.5.0 there is already a workaround.
> Rename IndexReader.reopen to make it clear that reopen may not happen
> ---------------------------------------------------------------------
>                 Key: LUCENE-3464
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.5, 4.0
>         Attachments: LUCENE-3464.3x.patch, LUCENE-3464.patch, LUCENE-3464.patch, LUCENE-3464_see_its_just_fine.patch
> Spinoff from LUCENE-3454 where Shai noted this inconsistency.
> IR.reopen sounds like an unconditional operation, which has trapped users in the past
into always closing the old reader instead of only closing it if the returned reader is new.
> I think this hidden maybe-ness is trappy and we should rename it (maybeReopen?  reopenIfNeeded?).
> In addition, instead of returning "this" when the reopen didn't happen, I think we should
return null to enforce proper usage of the maybe-ness of this API.

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