harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Dolgov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2498) [classlib][awt] java.awt.Tollkit.getImage(null) throws NPE while RI doesn't
Date Wed, 06 Dec 2006 14:10:21 GMT
[classlib][awt] java.awt.Tollkit.getImage(null) throws NPE while RI doesn't
---------------------------------------------------------------------------

                 Key: HARMONY-2498
                 URL: http://issues.apache.org/jira/browse/HARMONY-2498
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Pavel Dolgov
            Priority: Minor


Test case:
--------------
import java.awt.Toolkit;
import java.net.URL;

import junit.framework.TestCase;

public class TheTest extends TestCase {

    public static void main(String args[]) {
        junit.textui.TestRunner.run(TheTest.class);
    }

    public void testcase1() {
        Toolkit tk = Toolkit.getDefaultToolkit();
        assertNotNull(tk.getImage((String) null));
    }

    public void testcase2() {
        Toolkit tk = Toolkit.getDefaultToolkit();
        assertNotNull(tk.getImage((URL) null));
    }
}


RI output:
-------------
..
Time: 1,272

OK (2 tests)


Harmony output:
-------------
.E.E
Time: 0.591
There were 2 errors:
1) testcase1(TheTest)java.lang.NullPointerException
	at java.util.Hashtable.get(Hashtable.java)
	at java.awt.ToolkitImpl.getImage(ToolkitImpl.java:412)
	at java.awt.ToolkitImpl.getImage(ToolkitImpl.java)
	at TheTest.testcase1(TheTest.java:13)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:9)
2) testcase2(TheTest)java.lang.NullPointerException
	at java.util.Hashtable.get(Hashtable.java)
	at java.awt.ToolkitImpl.getImage(ToolkitImpl.java:431)
	at java.awt.ToolkitImpl.getImage(ToolkitImpl.java)
	at TheTest.testcase2(TheTest.java:18)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:9)

FAILURES!!!
Tests run: 2,  Failures: 0,  Errors: 2



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