harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "spark shen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-866) Arrays.binarySearch should always return -1on empty array
Date Thu, 14 Sep 2006 08:29:23 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-866?page=all ]

spark shen updated HARMONY-866:
-------------------------------

    Attachment: Harmony-866.diff

This is the new patch. Would you please have a try?

Best regards

> Arrays.binarySearch should always return -1on empty array
> ---------------------------------------------------------
>
>                 Key: HARMONY-866
>                 URL: http://issues.apache.org/jira/browse/HARMONY-866
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP
>            Reporter: Anton Luht
>            Priority: Minor
>         Attachments: Harmony-866.diff, patch.txt
>
>
> Harmony: classlib + VM revision 421248
> If we try to find a non-comparable item in an empty array, RI returns -1 while Harmony
throws ClassCastException. 
> Code to reproduce:
> import java.util.*;
> public class Test {
>     public static void main (String[] args) {  
>         System.err.println(Arrays.binarySearch(new Object[] {}, new Object()) == -1 ?
"PASSED" : "FAILED");
>     } 
> }
> -------
> Please see the patch with unit test for this case and fix for classlib code attached

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message