venkateshwaracholan opened a new pull request, #16252: URL: https://github.com/apache/lucene/pull/16252
### Description RoaringDocIdSet.Iterator#intoBitSet can throw a NullPointerException when called after the iterator has been exhausted. Once iteration reaches NO_MORE_DOCS, the underlying sub iterator is cleared. intoBitSet() does not currently handle that state and can still attempt to dereference the sub iterator. Add a null check before accessing the sub iterator and treat exhausted iterators as a no-op. Add a regression test that exhausts the iterator using both nextDoc() and advance() before calling intoBitSet(). The LRUQueryCache path reported in GITHUB#16250 has since been reworked on main, but the iterator bug itself is still present and the new test fails without this fix. <!-- If this is your first contribution to Lucene, please make sure you have reviewed the contribution guide. https://github.com/apache/lucene/blob/main/CONTRIBUTING.md --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
