[Mono-bugs] [Bug 45046][Wis] Changed - Array.BinarySearch can't search for nulls
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Wed, 18 Jun 2003 10:37:36 -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 lupus@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=45046
--- shadow/45046 Wed Jun 18 03:47:36 2003
+++ shadow/45046.tmp.13676 Wed Jun 18 10:37:36 2003
@@ -70,6 +70,13 @@
down the case where the arguments are valid. Having valid arguments
is the most likely path so it would be faster to remove the extra
checks.
Having the extra checks also makes it a pain to debug code because
it is duplicated code.
+
+------- Additional Comments From lupus@ximian.com 2003-06-18 10:37 -------
+There is at least an extraneous change at the beginning of the patch.
+You can't remove all the checks, for example you need to always check
+for array == null when the final BinarySearch() is called passing
+array.GetLowerBound(0)...
+Also, please include complete test cases, thanks.