uschindler commented on PR #15900: URL: https://github.com/apache/lucene/pull/15900#issuecomment-4180567735
I force pushed the changes to the tokenfilter, > But can we shrink wrap the try/except (move termAttribute.setLength(truncateAtChar); out)? I checked this, the code needs to NOT set the length when the exception occurs. Fixing this would create horrible if/else logic, so having the setLength() inside the try is better. The setLength() may throw exception, but it is impossible as the term new length is always smaller than the original length. I also updated the Javadocs. -- 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]
