2010-07-27 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@veritas-vos-liberabit.com>
Tue, 27 Jul 2010 09:29:09 +0000 (18:29 +0900)
committerAtsushi Eno <atsushieno@veritas-vos-liberabit.com>
Tue, 27 Jul 2010 09:29:09 +0000 (18:29 +0900)
* ConfigurationPropertyCollection.cs, PropertyInformation.cs:
  add null check to detect bogus configuration early.

mcs/class/System.Configuration/System.Configuration/ChangeLog
mcs/class/System.Configuration/System.Configuration/ConfigurationPropertyCollection.cs
mcs/class/System.Configuration/System.Configuration/PropertyInformation.cs

index 9a3074a73f102454b9694a69b950b20866efd2b4..005312a358f6399975f73e80cd19079de77b583f 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-27  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ConfigurationPropertyCollection.cs, PropertyInformation.cs:
+         add null check to detect bogus configuration early.
+
 2010-01-09  Marek Habersack  <mhabersack@novell.com>
 
        * ConfigurationLocation.cs: trailing / characters are removed from
index bbe44f45133bb4941f85dab8eb9c28fd3283c946..33dba87688bba8ab8648c12eeda9646a78b77993 100644 (file)
@@ -66,6 +66,8 @@ namespace System.Configuration
 
                public void Add (ConfigurationProperty property)
                {
+                       if (property == null)
+                               throw new ArgumentNullException ("property");
                        collection.Add (property);
                }
 
index 9d5662712ad43512cf778ba1b32dac945dde0d04..31cb6348a121d62362d2f7bb8bfab4917c51f8d6 100644 (file)
@@ -44,6 +44,10 @@ namespace System.Configuration
                
                internal PropertyInformation (ConfigurationElement owner, ConfigurationProperty property)
                {
+                       if (owner == null)
+                               throw new ArgumentNullException ("owner");
+                       if (property == null)
+                               throw new ArgumentNullException ("property");
                        this.owner = owner;
                        this.property = property;
                }