> ...either way, i'd still like clarification as to the orriginal point of this
> issue ... what was the bug? what would trigger the NPE?
It is triggers by having two ways to construct a MultiReader:
(1) as IndexReader does it for the regular (multi segment) index
MultiReader(Directory directory, SegmentInfos sis, boolean closeDirectory, IndexReader subReaders)
(2) as anyone can use it, for aggregating results from any indexes:
In (1) all readers use the same directory, and there is a single SegnentInfos.
This is the standard, tested way.
In (2) there is no single dir and no single SegmentInfos.
This is the "general", less tested way.
In this option, dir (of the multiReader) is initialized to that of subReader.
This seems spooky to me.
Also in this option, SegmentInfos in null.
It makes sense, since readers can be anything - but this is the cause for the NPE.
BTW, after (being surprised by) your first comment on this, I checked in 1.9.1 - the test (of case (2)) fails there as well.