After I made the change, TestIndexReaderReopen failed. Reason is that it is
assumed that one can call close() many times, without it affecting the
IndexReader instance. However, if I change the call to use refCount instead
of closes, then calling close() multiple times decreases the ref count
multiple times, until it is 0.

So I think we better keep closed, just in case someone out there relies on
this behavior.

Shai

On Wed, Oct 5, 2011 at 9:35 AM, Simon Willnauer <
[email protected]> wrote:

> +1
>
> On Wed, Oct 5, 2011 at 6:26 AM, Shai Erera <[email protected]> wrote:
> > Hi
> >
> > I noticed that IndexReader.close() sets a 'close' member to true, but we
> > never check this member. Can we eliminate it and change close() to check
> > refCount.get() > 0?
> >
> > Shai
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to