Author: benm
Date: 2005-04-04 15:23:07 -0400 (Mon, 04 Apr 2005)
New Revision: 42535

Modified:
   trunk/mcs/class/corlib/System.Threading/ChangeLog
   trunk/mcs/class/corlib/System.Threading/Thread.cs
Log:
2005-04-04  Ben Maurer  <[EMAIL PROTECTED]>

        * Thread.cs: Do argument checking for Current[UI]Culture to make
        the exception more clear for a null value being set.



Modified: trunk/mcs/class/corlib/System.Threading/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Threading/ChangeLog   2005-04-04 19:02:51 UTC 
(rev 42534)
+++ trunk/mcs/class/corlib/System.Threading/ChangeLog   2005-04-04 19:23:07 UTC 
(rev 42535)
@@ -1,3 +1,8 @@
+2005-04-04  Ben Maurer  <[EMAIL PROTECTED]>
+
+       * Thread.cs: Do argument checking for Current[UI]Culture to make
+       the exception more clear for a null value being set.
+
 2005-03-24  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * CompressedStack.cs: Added LinkDemand for UnmanagedCode and ECMA 

Modified: trunk/mcs/class/corlib/System.Threading/Thread.cs
===================================================================
--- trunk/mcs/class/corlib/System.Threading/Thread.cs   2005-04-04 19:02:51 UTC 
(rev 42534)
+++ trunk/mcs/class/corlib/System.Threading/Thread.cs   2005-04-04 19:23:07 UTC 
(rev 42535)
@@ -372,6 +372,9 @@
                        [SecurityPermission (SecurityAction.Demand, 
ControlThread=true)]
                        set {
                                in_currentculture = true;
+                               
+                               if (value == null)
+                                       throw new ArgumentNullException 
("value");
 
                                try {
                                        BinaryFormatter bf = new 
BinaryFormatter();
@@ -380,8 +383,7 @@
 
                                        SetCachedCurrentCulture (value);
                                        SetSerializedCurrentCulture 
(ms.GetBuffer ());
-                               }
-                               finally {
+                               } finally {
                                        in_currentculture = false;
                                }
                        }
@@ -439,6 +441,9 @@
                        
                        set {
                                in_currentculture = true;
+                               
+                               if (value == null)
+                                       throw new ArgumentNullException 
("value");
 
                                try {
                                        BinaryFormatter bf = new 
BinaryFormatter();
@@ -447,8 +452,7 @@
 
                                        SetCachedCurrentUICulture (value);
                                        SetSerializedCurrentUICulture 
(ms.GetBuffer ());
-                               }
-                               finally {
+                               } finally {
                                        in_currentculture = false;
                                }
                        }

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

Reply via email to