You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2021/11/18 18:50:57 UTC

[lucenenet] 01/02: BUG: Lucene.Net.Util.Automation.MinimizationOperations::MinimizeHopcroft(): Fixed call to OpenBitSet.Clear() to specify one past the end index as per the docs. This was causing Lucene.Net.Codecs.Lucene41.TestBlockPostingsFormat3.Test() to fail randomly.

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit cc76918071fd098b92e31d8bdecabe5aa6ef13af
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Wed Nov 17 06:09:38 2021 +0700

    BUG: Lucene.Net.Util.Automation.MinimizationOperations::MinimizeHopcroft(): Fixed call to OpenBitSet.Clear() to specify one past the end index as per the docs. This was causing Lucene.Net.Codecs.Lucene41.TestBlockPostingsFormat3.Test() to fail randomly.
---
 src/Lucene.Net/Util/Automaton/MinimizationOperations.cs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/Lucene.Net/Util/Automaton/MinimizationOperations.cs b/src/Lucene.Net/Util/Automaton/MinimizationOperations.cs
index 942d60b..a6169ea 100644
--- a/src/Lucene.Net/Util/Automaton/MinimizationOperations.cs
+++ b/src/Lucene.Net/Util/Automaton/MinimizationOperations.cs
@@ -1,5 +1,4 @@
 using J2N;
-using System.Collections;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using JCG = J2N.Collections.Generic;
@@ -214,7 +213,7 @@ namespace Lucene.Net.Util.Automaton
                     }
                     sb.Clear();
                 }
-                refine.Clear(0, refine.Length - 1);
+                refine.Clear(0, refine.Length);
             }
             // make a new state for each equivalence class, set initial state
             State[] newstates = new State[k];