lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [Lucene.Net] svn commit: r1100562 - in /incubator/lucene.net/branches/Lucene.Net_2_9_4g: DIFFs FROM 2.9.4.txt src/core/Search/Spans/SpanNearQuery.cs src/core/Search/Spans/SpanOrQuery.cs
Date Sat, 07 May 2011 16:10:58 GMT
Author: digy
Date: Sat May  7 16:10:58 2011
New Revision: 1100562

URL: http://svn.apache.org/viewvc?rev=1100562&view=rev
Log:
[LUCENENET-412]

Modified:
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/DIFFs FROM 2.9.4.txt
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanNearQuery.cs
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/DIFFs FROM 2.9.4.txt
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/DIFFs%20FROM%202.9.4.txt?rev=1100562&r1=1100561&r2=1100562&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/DIFFs FROM 2.9.4.txt (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/DIFFs FROM 2.9.4.txt Sat May  7 16:10:58
2011
@@ -12,8 +12,6 @@
 
 * LUCENENET-172 (fix for unexceptional exceptions ecountered in FastCharStream)
 
-* LUCENENET-413 (Medium trust security issue) &  test cases to run in partially trusted
AppDomain
-
 * LUCENENET-330 Search.Regex Minimal Port
 
 * LUCENENET-371 Unit test for Search.Regex port

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanNearQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanNearQuery.cs?rev=1100562&r1=1100561&r2=1100562&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanNearQuery.cs
(original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanNearQuery.cs
Sat May  7 16:10:58 2011
@@ -104,10 +104,8 @@ namespace Lucene.Net.Search.Spans
         public override IList<Lucene.Net.Index.Term> GetTerms()
 		{
             List<Lucene.Net.Index.Term> terms = new List<Index.Term>();
-			System.Collections.IEnumerator i = clauses.GetEnumerator();
-			while (i.MoveNext())
-			{
-				SpanQuery clause = (SpanQuery) i.Current;
+            foreach(SpanQuery clause in clauses)
+            {
 				terms.AddRange(clause.GetTerms());
 			}
 			return terms;
@@ -126,11 +124,9 @@ namespace Lucene.Net.Search.Spans
 		{
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
 			buffer.Append("spanNear([");
-			System.Collections.IEnumerator i = clauses.GetEnumerator();
-			while (i.MoveNext())
+            foreach(SpanQuery clause in clauses)
 			{
-				SpanQuery clause = (SpanQuery) i.Current;
-				buffer.Append(clause.ToString(field));
+    			buffer.Append(clause.ToString(field));
                 buffer.Append(", ");
 			}
             if (clauses.Count > 0) buffer.Length -= 2;
@@ -212,12 +208,12 @@ namespace Lucene.Net.Search.Spans
 				return false;
 			if (clauses.Count != spanNearQuery.clauses.Count)
 				return false;
-            System.Collections.IEnumerator iter1 = clauses.GetEnumerator();
-            System.Collections.IEnumerator iter2 = spanNearQuery.clauses.GetEnumerator();
+            IEnumerator<SpanQuery> iter1 = clauses.GetEnumerator();
+            IEnumerator<SpanQuery> iter2 = spanNearQuery.clauses.GetEnumerator();
             while (iter1.MoveNext() && iter2.MoveNext())
             {
-                SpanQuery item1 = (SpanQuery)iter1.Current;
-                SpanQuery item2 = (SpanQuery)iter2.Current;
+                SpanQuery item1 = iter1.Current;
+                SpanQuery item2 = iter2.Current;
                 if (!item1.Equals(item2))
                     return false;
             }

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs?rev=1100562&r1=1100561&r2=1100562&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/src/core/Search/Spans/SpanOrQuery.cs Sat
May  7 16:10:58 2011
@@ -216,10 +216,8 @@ namespace Lucene.Net.Search.Spans
 		
 		public override void  ExtractTerms(Support.Set<Lucene.Net.Index.Term> terms)
 		{
-			System.Collections.IEnumerator i = clauses.GetEnumerator();
-			while (i.MoveNext())
+            foreach(SpanQuery clause in clauses)
 			{
-				SpanQuery clause = (SpanQuery) i.Current;
 				clause.ExtractTerms(terms);
 			}
 		}
@@ -268,12 +266,10 @@ namespace Lucene.Net.Search.Spans
 		{
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
 			buffer.Append("spanOr([");
-			System.Collections.IEnumerator i = clauses.GetEnumerator();
             int j = 0;
-			while (i.MoveNext())
+            foreach (SpanQuery clause in clauses)
 			{
                 j++;
-				SpanQuery clause = (SpanQuery) i.Current;
 				buffer.Append(clause.ToString(field));
                 if (j < clauses.Count)
                 {



Mime
View raw message