harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4515) [drlvm] ClassCastException is thrown with low detail
Date Sun, 22 Jul 2007 23:22:31 GMT
[drlvm] ClassCastException is thrown with low detail
----------------------------------------------------

                 Key: HARMONY-4515
                 URL: https://issues.apache.org/jira/browse/HARMONY-4515
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Vasily Zakharov


DRLVM, when throws ClassCastException, provides no detail about what were the class being
cast and the target for the cast. This makes localizing problems in applications more difficult.

RI provides information only on the class being cast, and IBM VME provides information on
both.

This situation is not certainly a bug, it may be considered an Improvement or Non-bug difference
from RI. However I think DRLVM should better follow the IBM VME behavior, or, at least, RI
behavior, to improve its usability.

Test to reproduce the problem:

public class Test {
    public static void main(String[] args) {
        try {
            Class c = (Class) (Object) "test";
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }
}

Output on RI:

java.lang.ClassCastException: java.lang.String
        at Test.main(Test.java:4)

Harmony/IBM VME:

java.lang.ClassCastException: java.lang.String incompatible with java.lang.Class
        at Test.main(Test.java:4)

Harmony/DRLVM:

java.lang.ClassCastException
        at Test.main(Test.java:4)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message