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:56 UTC

[lucenenet] branch master updated (1383437 -> c296087)

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

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


    from 1383437  BUG: Lucene.Net.Codecs.SimpleText.SimpleTextFieldsReader::NextDoc(): Assert was using BytesRef.Utf8ToString(), which was causing exceptions when the BytesRef didn't contain valid UTF8. Changed to use BytesRefFormatter, which defers the call to convert the BytesRef until after the assert fails.
     new cc76918  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.
     new c296087  Lucene.Net.Util: Added TODOs about fixing the APIs of OpenBitSet and FixedBitSet to use index and length rather than startIndex and endIndex.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/Lucene.Net/Util/Automaton/MinimizationOperations.cs | 3 +--
 src/Lucene.Net/Util/FixedBitSet.cs                      | 2 +-
 src/Lucene.Net/Util/OpenBitSet.cs                       | 8 ++++----
 3 files changed, 6 insertions(+), 7 deletions(-)

[lucenenet] 02/02: Lucene.Net.Util: Added TODOs about fixing the APIs of OpenBitSet and FixedBitSet to use index and length rather than startIndex and endIndex.

Posted by ni...@apache.org.
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 c296087c4ee276a9e7059d666a8d8742c82546a9
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Wed Nov 17 06:10:34 2021 +0700

    Lucene.Net.Util: Added TODOs about fixing the APIs of OpenBitSet and FixedBitSet to use index and length rather than startIndex and endIndex.
---
 src/Lucene.Net/Util/FixedBitSet.cs | 2 +-
 src/Lucene.Net/Util/OpenBitSet.cs  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Lucene.Net/Util/FixedBitSet.cs b/src/Lucene.Net/Util/FixedBitSet.cs
index bbad7e9..96f7344 100644
--- a/src/Lucene.Net/Util/FixedBitSet.cs
+++ b/src/Lucene.Net/Util/FixedBitSet.cs
@@ -659,7 +659,7 @@ namespace Lucene.Net.Util
         /// </summary>
         /// <param name="startIndex"> Lower index </param>
         /// <param name="endIndex"> One-past the last bit to clear </param>
-        public void Clear(int startIndex, int endIndex)
+        public void Clear(int startIndex, int endIndex) // LUCENENET TODO: API: Change this to use startIndex and length to match .NET
         {
             if (Debugging.AssertsEnabled)
             {
diff --git a/src/Lucene.Net/Util/OpenBitSet.cs b/src/Lucene.Net/Util/OpenBitSet.cs
index bcc712e..884633b 100644
--- a/src/Lucene.Net/Util/OpenBitSet.cs
+++ b/src/Lucene.Net/Util/OpenBitSet.cs
@@ -312,7 +312,7 @@ namespace Lucene.Net.Util
         /// </summary>
         /// <param name="startIndex"> Lower index </param>
         /// <param name="endIndex"> One-past the last bit to set </param>
-        public virtual void Set(long startIndex, long endIndex)
+        public virtual void Set(long startIndex, long endIndex) // LUCENENET TODO: API: Change this to use startIndex and length to match .NET
         {
             if (endIndex <= startIndex)
             {
@@ -401,7 +401,7 @@ namespace Lucene.Net.Util
         /// </summary>
         /// <param name="startIndex"> Lower index </param>
         /// <param name="endIndex"> One-past the last bit to clear </param>
-        public virtual void Clear(int startIndex, int endIndex)
+        public virtual void Clear(int startIndex, int endIndex) // LUCENENET TODO: API: Change this to use startIndex and length to match .NET
         {
             if (endIndex <= startIndex)
             {
@@ -448,7 +448,7 @@ namespace Lucene.Net.Util
         /// </summary>
         /// <param name="startIndex"> Lower index </param>
         /// <param name="endIndex"> One-past the last bit to clear </param>
-        public virtual void Clear(long startIndex, long endIndex)
+        public virtual void Clear(long startIndex, long endIndex) // LUCENENET TODO: API: Change this to use startIndex and length to match .NET
         {
             if (endIndex <= startIndex)
             {
@@ -587,7 +587,7 @@ namespace Lucene.Net.Util
         /// </summary>
         /// <param name="startIndex"> Lower index </param>
         /// <param name="endIndex"> One-past the last bit to flip </param>
-        public virtual void Flip(long startIndex, long endIndex)
+        public virtual void Flip(long startIndex, long endIndex) // LUCENENET TODO: API: Change this to use startIndex and length to match .NET
         {
             if (endIndex <= startIndex)
             {

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

Posted by ni...@apache.org.
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];