lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Busch <>
Subject Re: variuos IndexReader methods -- was: Re: [jira] Updated: (LUCENE-832) NPE when calling isCurrent() on a ParallellReader
Date Thu, 02 Aug 2007 19:10:04 GMT
Chris Hostetter wrote:
> is it just me, or does it seem like the base class versions of
> getVersion(), isOptimized(), and isCurrent() in IndexReader should all
> throw UnsupportedOperationException?
> (it seems like ideally they should abstract, but that ship/API has sailed)


I think this makes sense because all these methods use the variable
IndexReader.segmentInfos which might be null in case this constructor is
 protected IndexReader(Directory directory);

We just have to make segmentInfos in IndexReader protected so that
subclasses can implement the methods.

- Michael

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

View raw message