The non-public SegmentInfos makes an appearance here in a public API. Perhaps this constructor should be package-private.
Both constructors of IndexReader or at least the one with SegmentInfos should
be made package-private. Thats probably better than protected.
We need at least one that's not package private, so that classes outside this package can implement the IndexReader API.
Or perhaps, since the SegmentInfos instance is only used once on line 414, for version checking, we should instead add an abstract getVersion() method implemented by subclasses. Could that work?
Donīt know exactly what you mean here. We already have the getCurrentVersion
method in IndexReader, but you probably mean something else.
I was trying to think of a way to avoid having to pass the SegmentInfos to this constructor at all, since it is only used once to extract a long. Perhaps one could simply pass the long in? Perhaps the SegmentInfos field of IndexReader could be replaced with a version field. I'm just trying to reduce the IndexReader's dependencies on package-private implementation stuff, to make it a more pure abstract class. This is not high-priority.
Do you agree to the changes concerning the bahavior of undeleteAll and close?
Yes, I think these look good.
Doug
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]