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


The following commit(s) were added to refs/heads/master by this push:
     new 7308bc1  
Lucene.Net.TestFramework.Search.CheckHits::CheckHitCollector(): Removed 
unnecessary call to Convert.ToInt32 and simplified collection initialization.
7308bc1 is described below

commit 7308bc107314036d7bf5f93e2df18aabbacb4aff
Author: Shad Storhaug <[email protected]>
AuthorDate: Sat Nov 13 21:50:28 2021 +0700

    Lucene.Net.TestFramework.Search.CheckHits::CheckHitCollector(): Removed 
unnecessary call to Convert.ToInt32 and simplified collection initialization.
---
 src/Lucene.Net.TestFramework/Search/CheckHits.cs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/Lucene.Net.TestFramework/Search/CheckHits.cs 
b/src/Lucene.Net.TestFramework/Search/CheckHits.cs
index 5ccfbc7..0e07034 100644
--- a/src/Lucene.Net.TestFramework/Search/CheckHits.cs
+++ b/src/Lucene.Net.TestFramework/Search/CheckHits.cs
@@ -119,11 +119,7 @@ namespace Lucene.Net.Search
 
             Trace.TraceInformation("Checked");
 
-            JCG.SortedSet<int> correct = new JCG.SortedSet<int>();
-            for (int i = 0; i < results.Length; i++)
-            {
-                correct.Add(Convert.ToInt32(results[i], 
CultureInfo.InvariantCulture));
-            }
+            JCG.SortedSet<int> correct = new JCG.SortedSet<int>(results);
             JCG.SortedSet<int> actual = new JCG.SortedSet<int>();
             ICollector c = new SetCollector(actual);
 

Reply via email to