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: r1166024 - /incubator/lucene.net/trunk/src/core/Analysis/CharArraySet.cs
Date Wed, 07 Sep 2011 07:03:01 GMT
Author: digy
Date: Wed Sep  7 07:03:01 2011
New Revision: 1166024

URL: http://svn.apache.org/viewvc?rev=1166024&view=rev
Log:
[LUCENENET-414] The definition of CharArraySet is dangerously confusing and leads to bugs
when used.
Forgot to add the type casting  in previous patch 

Modified:
    incubator/lucene.net/trunk/src/core/Analysis/CharArraySet.cs

Modified: incubator/lucene.net/trunk/src/core/Analysis/CharArraySet.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Analysis/CharArraySet.cs?rev=1166024&r1=1166023&r2=1166024&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Analysis/CharArraySet.cs (original)
+++ incubator/lucene.net/trunk/src/core/Analysis/CharArraySet.cs Wed Sep  7 07:03:01 2011
@@ -59,7 +59,7 @@ namespace Lucene.Net.Analysis
 		/// <summary>Create set from a Collection of char[] or String </summary>
 		public CharArraySet(System.Collections.ICollection c, bool ignoreCase):this(c.Count, ignoreCase)
 		{
-			System.Collections.IEnumerator e = c.GetEnumerator();
+            System.Collections.IEnumerator e = c is CharArraySet ? ((CharArraySet)c).GetEnumerator()
: c.GetEnumerator();
 			while (e.MoveNext())
 			{
 				Add(e.Current);



Mime
View raw message