2005-10-25 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Tue, 25 Oct 2005 22:54:20 +0000 (22:54 -0000)
committerChris Toshok <toshok@novell.com>
Tue, 25 Oct 2005 22:54:20 +0000 (22:54 -0000)
* KeyValueConfigurationCollection.cs: GetElementKey should throw
NRE if element == null.

svn path=/trunk/mcs/; revision=52214

mcs/class/System.Configuration/System.Configuration/ChangeLog
mcs/class/System.Configuration/System.Configuration/KeyValueConfigurationCollection.cs

index d65e0f76ec03c9dcebdd0a5a9dffdeab2291667f..e2642e056767d971c259a95bfc344c7e695986a9 100644 (file)
@@ -1,5 +1,8 @@
 2005-10-25  Chris Toshok  <toshok@ximian.com>
 
+       * KeyValueConfigurationCollection.cs: GetElementKey should throw
+       NRE if element == null.
+
        * CommaDelimitedStringCollection.cs: raise the correct exceptions
        in the read only case, and return null from ToString if there are
        0 elements.
index 78301f6b3982aaa2b20e166b1faee3e659ffa14e..9f33406132373b719f924b26d924cf4162e55d46 100644 (file)
@@ -75,9 +75,10 @@ namespace System.Configuration
                        return new KeyValueConfigurationElement ("", "");
                }
                
+               [MonoTODO ("need to add back in the BaseIndexOf test")]
                protected override object GetElementKey (ConfigurationElement element)
                {
-                       if (element == null/* || BaseIndexOf (element) == -1*/)
+                       if (false /* BaseIndexOf (element) == -1*/)
                                return "";
 
                        return ((KeyValueConfigurationElement)element).Key;