Author: nestor
Date: 2007-10-19 11:08:47 -0400 (Fri, 19 Oct 2007)
New Revision: 87832

Modified:
   trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/ChangeLog
   trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/Expression.cs
Log:
2007-10-19  Nestor Salceda  <[EMAIL PROTECTED]>
        
        * Expression.cs: When overriding the Equals method, if the value is
        null, then return false.  Fixes the EqualShouldHandleNullArgRule
        violation.



Modified: trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/ChangeLog
===================================================================
--- trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/ChangeLog  2007-10-19 
15:02:50 UTC (rev 87831)
+++ trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/ChangeLog  2007-10-19 
15:08:47 UTC (rev 87832)
@@ -1,5 +1,11 @@
 2007-10-19  Nestor Salceda  <[EMAIL PROTECTED]>
+       
+       * Expression.cs: When overriding the Equals method, if the value is
+       null, then return false.  Fixes the EqualShouldHandleNullArgRule
+       violation.
 
+2007-10-19  Nestor Salceda  <[EMAIL PROTECTED]>
+
        * Utilities.cs: Marked this class as static for avoid uninstantiated
        internal class rule violation.
 

Modified: trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/Expression.cs
===================================================================
--- trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/Expression.cs      
2007-10-19 15:02:50 UTC (rev 87831)
+++ trunk/cecil/gendarme/rules/Gendarme.Rules.Smells/Expression.cs      
2007-10-19 15:08:47 UTC (rev 87832)
@@ -62,7 +62,9 @@
                {
                        if (!(value is Expression))
                                throw new ArgumentException ("The value 
argument should be an Expression", "value");
-                                               
+                       if (value == null)
+                               return false;   
+
                        Expression targetExpression = (Expression) value;
                                                
                        if (HasSameSize (targetExpression)) 

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

Reply via email to