NightOwl888 opened a new pull request #299:
URL: https://github.com/apache/lucenenet/pull/299


   This fixes #267 by converting these asserts that were intended for control 
flow during testing into `InvalidOperationException`s. In the test framework, 
we are still throwing `Lucene.Net.Diagnostics.AssertionException` in order to 
differentiate an "assert" from other cases that are throwing 
`InvalidOperationException`.
   
   This is similar to how Lucene 8.x behaves, and only affects legacy codecs 
for `Lucene3x` and `Lucene40`.
   
   As for `BlockTreeTermsWriter`, its assert was failing due to lack of 
validation on the `Prefix` to ensure it is valid UTF-8. Since the problem is 
only when building the string in the assert, a private method was added to 
generate the string by catching exceptions due to invalid UTF-8 and falling 
back to just writing out the display of bytes in `BytesRef`.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to