harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Luht (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1196) Class.forName(null) throws different exceptions in RI and Harmony
Date Wed, 23 Aug 2006 14:45:14 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1196?page=comments#action_12430020 ] 
            
Anton Luht commented on HARMONY-1196:
-------------------------------------

Please consider this attachment having ASF license

> Class.forName(null) throws different exceptions in RI and Harmony
> -----------------------------------------------------------------
>
>                 Key: HARMONY-1196
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1196
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>         Environment: Windows XP
>            Reporter: Anton Luht
>            Priority: Minor
>         Attachments: class_npe.patch
>
>
> The following code:
> import java.lang.reflect.*;
> public class Test { 
>   public static void main(String[] args) throws Throwable { 
>        Class clz = Class.forName(null);
>   } 
> } 
> prints in RI:
> Exception in thread "main" java.lang.NullPointerException
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Unknown Source)
>         at Test.main(Test.java:5)
> and in Harmony
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r431586, (Aug 15 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> java.lang.ClassNotFoundException
>         at java.lang.Class.forName()
>         at java.lang.Class.forName()
>         at Test.main(Test.java:5)
> The code that makes Harmony throw NPE in this case is 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