FastCharStream is used internally by solr query parser classes. It throws a new IOException to signal the end. However, this is quite expensive relative to most operations and it shows up very high on samples for extremely high query cases. The IOException should be a single static instance that can be shared to avoid the overhead in creation and populating the stack trace, a stack trace which is never used.
- relates to
SOLR-11242 QueryParser should avoid creating an LookaheadSuccess(Error) object with every instance