Author: spouliot
Date: 2006-08-28 16:26:06 -0400 (Mon, 28 Aug 2006)
New Revision: 64495

Modified:
   trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
   trunk/mcs/class/System.Drawing/System.Drawing/Color.cs
   trunk/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs
   trunk/mcs/class/System.Drawing/System.Drawing/ImageAnimator.cs
Log:
2006-08-28  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * ImageAnimator.cs: Remove catch/throw in WorkerThread (it hides the
        original exception). Found with Gendarme.
        * Color.cs: Remove the double-check lock. Found with Gendarme.
        * ColorConverter.cs: Remove the double-check lock. Found with Gendarme



Modified: trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog     2006-08-28 
20:11:50 UTC (rev 64494)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ChangeLog     2006-08-28 
20:26:06 UTC (rev 64495)
@@ -1,3 +1,10 @@
+2006-08-28  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * ImageAnimator.cs: Remove catch/throw in WorkerThread (it hides the
+       original exception). Found with Gendarme.
+       * Color.cs: Remove the double-check lock. Found with Gendarme.
+       * ColorConverter.cs: Remove the double-check lock. Found with Gendarme
+
 2006-08-28  Jonathan Chambers  <[EMAIL PROTECTED]> 
 
        * ComIStreamMarshaler.cs: Do not free memory allocated for

Modified: trunk/mcs/class/System.Drawing/System.Drawing/Color.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/Color.cs      2006-08-28 
20:11:50 UTC (rev 64494)
+++ trunk/mcs/class/System.Drawing/System.Drawing/Color.cs      2006-08-28 
20:26:06 UTC (rev 64495)
@@ -10,12 +10,8 @@
 // (C) 2002 Dennis Hayes
 // (c) 2002 Ximian, Inc. (http://www.ximiam.com)
 // (C) 2005 HotFeet GmbH (http://www.hotfeet.ch)
+// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
 //
-// TODO: Are the static/non static functions declared correctly
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
@@ -36,7 +32,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.Collections;
 using System.Runtime.InteropServices;
 using System.ComponentModel;
@@ -214,9 +209,6 @@
 
                private static void FillColorNames ()
                {
-                       if (systemColors != null)
-                               return;
-
                        lock (creatingColorNames) {
                                if (systemColors != null)
                                        return;

Modified: trunk/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs     
2006-08-28 20:11:50 UTC (rev 64494)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs     
2006-08-28 20:26:06 UTC (rev 64495)
@@ -206,11 +206,7 @@
 
                public override StandardValuesCollection GetStandardValues 
(ITypeDescriptorContext context)
                {
-                       if (cached != null)
-                               return cached;
-
-                       lock (creatingCached)
-                       {
+                       lock (creatingCached) {
                                if (cached != null)
                                        return cached;
                        

Modified: trunk/mcs/class/System.Drawing/System.Drawing/ImageAnimator.cs
===================================================================
--- trunk/mcs/class/System.Drawing/System.Drawing/ImageAnimator.cs      
2006-08-28 20:11:50 UTC (rev 64494)
+++ trunk/mcs/class/System.Drawing/System.Drawing/ImageAnimator.cs      
2006-08-28 20:26:06 UTC (rev 64495)
@@ -6,11 +6,8 @@
 //   Sanjay Gupta ([EMAIL PROTECTED])
 //
 // (C) 2002 Ximian, Inc
+// Copyright (C) 2004,2006 Novell, Inc (http://www.novell.com)
 //
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
@@ -30,7 +27,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-using System;
+
 using System.Drawing.Imaging;
 using System.Threading;
 using System.Collections;
@@ -214,8 +211,6 @@
                                }                               
                        } catch (ThreadAbortException) { 
                                Thread.ResetAbort (); // we're going to finish 
anyway
-                       } catch (Exception er) {
-                               throw er;
                        }
                }
        }

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

Reply via email to