Lucene.Net.Codecs.Lucene3x.Lucene3xTermVectorsReader: Added compilation symbol to remove failing DebugAssert from .NET Standard 2.0 because it causes VSTest to fatally crash
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/4de713a8 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/4de713a8 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/4de713a8 Branch: refs/heads/master Commit: 4de713a85ab13af2f960f075068874958397b1e1 Parents: ad5fbf4 Author: Shad Storhaug <[email protected]> Authored: Thu Aug 31 02:25:53 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Aug 31 02:25:53 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4de713a8/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs index 75f5c18..8a5e789 100644 --- a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs +++ b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs @@ -819,7 +819,13 @@ namespace Lucene.Net.Codecs.Lucene3x public override int NextPosition() { + // LUCENENET TODO: on .NET Core 2.0, this assert causes an uncatchable exception. + // See: https://github.com/Microsoft/vstest/issues/1022 + // Once the issue has been identified and fixed we can remove this conditional + // compilation for it on .NET Core 2.0. +#if !NETSTANDARD2_0 Debug.Assert((positions != null && nextPos < positions.Length) || startOffsets != null && nextPos < startOffsets.Length); +#endif if (positions != null) {
