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] Created: (HARMONY-1196) Class.forName(null) throws different exceptions in RI and Harmony
Date Tue, 15 Aug 2006 13:24:14 GMT
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

        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


View raw message