lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Busch <busch...@gmail.com>
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)
> 
> 

Hoss,

I think this makes sense because all these methods use the variable
IndexReader.segmentInfos which might be null in case this constructor is
used:
 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message