Hi, In my opinion, removing the listener before close looks wrong. Because you would not get the listener events for the explicit close of the DirectoryReader.
I would just remove the ensureOpen(). We should open issue. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: [email protected] > -----Original Message----- > From: Michael McCandless [mailto:[email protected]] > Sent: Wednesday, August 20, 2014 9:53 AM > To: Lucene/Solr dev; Phil Herold > Subject: Re: IndexReader.removeReaderClosedListener > > Hmm, you should call this method before closing the IndexReader, to > remove a listener you previously added. > > Mike McCandless > > http://blog.mikemccandless.com > > > On Tue, Aug 19, 2014 at 11:27 AM, Phil Herold <[email protected]> > wrote: > > The implementation of this final method (latest 4.9 code) calls > > ensureOpen(), which fails, since the reader is closed. As a result, > > this method doesn't work. It seems as if this is therefore a potential > > memory leak, not being able to remove the listener. Or am I missing > something? > > > > -- > > Phil > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] For additional > commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
