lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] NightOwl888 opened a new pull request #299: Failing Asserts on .NET Standard 2.x (fixes #267)
Date Mon, 29 Jun 2020 18:51:41 GMT

NightOwl888 opened a new pull request #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:

View raw message