lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [03/50] lucenenet git commit: Lucene.Net.Sandbox.Queries.FuzzyLikeThisQuery: replaced weird iterator loop with foreach to ensure Dispose() is called.
Date Thu, 30 Mar 2017 17:59:58 GMT
Lucene.Net.Sandbox.Queries.FuzzyLikeThisQuery: replaced weird iterator loop with foreach to
ensure Dispose() is called.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/44bba1b5
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/44bba1b5
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/44bba1b5

Branch: refs/heads/api-work
Commit: 44bba1b584424d3a12efe71c0cb43979c4745f79
Parents: 8eb4616
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Mar 29 19:13:10 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Mar 30 09:12:27 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Sandbox/Queries/FuzzyLikeThisQuery.cs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44bba1b5/src/Lucene.Net.Sandbox/Queries/FuzzyLikeThisQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Sandbox/Queries/FuzzyLikeThisQuery.cs b/src/Lucene.Net.Sandbox/Queries/FuzzyLikeThisQuery.cs
index f3e7ff0..d866954 100644
--- a/src/Lucene.Net.Sandbox/Queries/FuzzyLikeThisQuery.cs
+++ b/src/Lucene.Net.Sandbox/Queries/FuzzyLikeThisQuery.cs
@@ -276,9 +276,8 @@ namespace Lucene.Net.Sandbox.Queries
                 return rewrittenQuery;
             }
             //load up the list of possible terms
-            for (IEnumerator<FieldVals> iter = fieldVals.GetEnumerator(); iter.MoveNext();)
+            foreach (var f in fieldVals)
             {
-                FieldVals f = iter.Current;
                 AddTerms(reader, f);
             }
             //clear the list of fields


Mime
View raw message