You're right, technically this is an API change.
The only cases I changed were the ones stemming from
original "docs out of order" corruption plus 2 other consisteny checks
I had added as part of the fix for
(There are other places where Lucene throws a IllegalStateException
that I did not change.)
I think it's extremely unlikely users are relying on the
IllegalStateException specifically (ie catching it explicitly and
doing something about it)?
EG these particular cases were never listed in the "throws"
(IllegalStateException is unchecked). And if you hit this exception
your index truly is corrupt.
Since these really are cases of severe index corruption I thought it
best to throw CorruptIndexException instead?