You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2011/09/07 09:03:01 UTC

[Lucene.Net] svn commit: r1166024 - /incubator/lucene.net/trunk/src/core/Analysis/CharArraySet.cs

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);