[Mono-bugs] [Bug 41524][Nor] New - Delegate equal operator

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 18 Apr 2003 03:55:57 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by juancri@tagnet.org.

http://bugzilla.ximian.com/show_bug.cgi?id=41524

--- shadow/41524	Fri Apr 18 03:55:57 2003
+++ shadow/41524.tmp.8422	Fri Apr 18 03:55:57 2003
@@ -0,0 +1,48 @@
+Bug#: 41524
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: juancri@tagnet.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Delegate equal operator
+
+The == operator produces an unhandled exception when a != null and b == 
+null.
+
+FIX:
+
+file: /mcs/class/corlib/System/Delegate.cs
+lines: 290 ~ 295
+
+if ((object)a == null) {
+    if ((object)b == null)
+        return true;
+    return false;
+}
+return a.Equals( b );
+
+Should be:
+
+if ((object)a == null) {
+    if ((object)b == null)
+        return true;
+    return false;
+} else if ((object) b == null)
+    return false;
+return a.Equals( b );
+
+=======================
+- }
++ } else if ((object) b == null)
++    return false;
+=======================