Author: calberto
Date: 2006-08-18 02:12:18 -0400 (Fri, 18 Aug 2006)
New Revision: 63975

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
Log:
2006-08-18  Carlos Alberto Cortez <[EMAIL PROTECTED]>

        * ComboBox.cs: Throw ArgumentNullException when adding/modifyng
        null items in ObjectCollection class.
        * ListBox.cs.: Likewise.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-08-18 05:59:57 UTC (rev 63974)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-08-18 06:12:18 UTC (rev 63975)
@@ -1,3 +1,9 @@
+2006-08-18  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       * ComboBox.cs: Throw ArgumentNullException when adding/modifyng
+       null items in ObjectCollection class.
+       * ListBox.cs.: Likewise.
+
 2006-08-18  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * ThemeNice.cs, ThemeClearlooks.cs : remove RadioButton_DrawFocus()

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs      
2006-08-18 05:59:57 UTC (rev 63974)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs      
2006-08-18 06:12:18 UTC (rev 63975)
@@ -1268,6 +1268,8 @@
                                set {
                                        if (index < 0 || index >= Count)
                                                throw new 
ArgumentOutOfRangeException ("Index of out range");
+                                       if (value == null)
+                                               throw new ArgumentNullException 
("value");
 
                                        object_items[index] = value;
                                }
@@ -1390,6 +1392,9 @@
                        #region Private Methods
                        private int AddItem (object item)
                        {
+                               if (item == null)
+                                       throw new ArgumentNullException 
("item");
+
                                int cnt = object_items.Count;
                                object_items.Add (item);
                                return cnt;

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs       
2006-08-18 05:59:57 UTC (rev 63974)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs       
2006-08-18 06:12:18 UTC (rev 63975)
@@ -1939,6 +1939,8 @@
                                set {
                                        if (index < 0 || index >= Count)
                                                throw new 
ArgumentOutOfRangeException ("Index of out range");
+                                       if (value == null)
+                                               throw new ArgumentNullException 
("value");
 
                                        object_items[index] = value;
                                        owner.CollectionChanged ();
@@ -2059,6 +2061,9 @@
                        #region Private Methods
                        internal int AddItem (object item)
                        {
+                               if (item == null)
+                                       throw new ArgumentNullException 
("item");
+
                                int cnt = object_items.Count;
                                object_items.Add (item);
                                return cnt;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to