Pārlūkot izejas kodu

2009-07-09 Jb Evain <[email protected]>

	* HashSet.cs (ICollection<T>.Add): fix for bug #520760. Do not throw
	when adding duplicates.


svn path=/trunk/mcs/; revision=137653
Jb Evain 16 gadi atpakaļ
vecāks
revīzija
df74eca620

+ 5 - 0
mcs/class/System.Core/System.Collections.Generic/ChangeLog

@@ -1,3 +1,8 @@
+2009-07-09  Jb Evain  <[email protected]>
+
+	* HashSet.cs (ICollection<T>.Add): fix for bug #520760. Do not throw
+	when adding duplicates.
+
 2009-01-27  Jb Evain  <[email protected]>
 
 	* HashSet.cs: use Paolo's trick to return items in insertion order

+ 1 - 2
mcs/class/System.Core/System.Collections.Generic/HashSet.cs

@@ -558,8 +558,7 @@ namespace System.Collections.Generic {
 
 		void ICollection<T>.Add (T item)
 		{
-			if (!Add (item))
-				throw new ArgumentException ();
+			Add (item);
 		}
 
 		IEnumerator IEnumerable.GetEnumerator ()