harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-1367) [classlib][util] unexpected ClassCastException for Collections.binarySearch(..)
Date Thu, 14 Sep 2006 10:48:23 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1367?page=all ]

Mark Hindess resolved HARMONY-1367.
-----------------------------------

    Resolution: Fixed

Patch and test applied in r443309.

Vladimir, Please verify this fixes the problem.  Thanks.


> [classlib][util] unexpected ClassCastException for Collections.binarySearch(..)
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-1367
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1367
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vladimir Ivanov
>         Assigned To: Mark Hindess
>         Attachments: HARMONY-1367.diff, HARMONY-1367.diff
>
>
> The method java.util.Collections.binarySearch(..) throws ClassCastException on Harmony
while works OK on RI.
> ==================== test.java ==================
> import java.awt.HeadlessException;
> import java.util.*;
> public class test {
>     public static void main(String args[]) {
>         List localList = new LinkedList();
>         try {
>             Collections.binarySearch(localList, new HeadlessException());
>             System.out.println("OK: no exception expected!");
>         } catch (Exception e) {
>             System.out.println("unexpected exception: " + e);
>         }
>         localList.add(new String());
>         try {
>             Collections.binarySearch(localList, new HeadlessException());
>             System.out.println("Exception expected!");
>         } catch (Exception e) {
>             System.out.println("OK: " + e);
>         }
>     }
> }
> =============================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System
optimized over throughput (initial strategy singleparpar))
> OK: no exception expected!
> OK: java.lang.ClassCastException: java.awt.HeadlessException
> C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion
test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> unexpected exception: java.lang.ClassCastException: java.awt.HeadlessException incompatible
with java.lang.Comparable
> OK: java.lang.ClassCastException: java.awt.HeadlessException incompatible with java.lang.Comparable
> C:\tmp\tmp17>C:\harmony\drlvm1.5\build\win_ia32_msvc_debug\deploy\jre\bin\java -Dvm.assert_dialog=false
-cp . -showversion test
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r438744, (Aug 31 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> unexpected exception: java.lang.ClassCastException
> OK: java.lang.ClassCastException

-- 
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