[Mono-bugs] [Bug 77030][Wis] New - sorter being called on binarysearch of collection with zero items

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Dec 18 17:19:04 EST 2005


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 ddulai at bloomberg.net.

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

--- shadow/77030	2005-12-18 17:19:04.000000000 -0500
+++ shadow/77030.tmp.11949	2005-12-18 17:19:04.000000000 -0500
@@ -0,0 +1,42 @@
+Bug#: 77030
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: ddulai at bloomberg.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: sorter being called on binarysearch of collection with zero items
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+sorter being called on binarysearch of collection with zero items
+
+Steps to reproduce the problem:
+1. create a List<foo> w/ zero items
+2. do a binarysearch on it like this:
+int idx = list.BinarySearch(nwe foo(), new Sorter());
+3. where sorter is:
+class Sorter : IComparer<foo> {
+  public int Compare(foo a, foo b) {
+     ..........
+  }
+}
+
+Actual Results:
+Compare() gets called with null values
+
+Expected Results:
+Compare() should not get called, and does not in microsoft .net 2.0
+
+How often does this happen? 
+always


More information about the mono-bugs mailing list