harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2460) [classlib][awt] MenuItem.dispatchEvent(AWTEvent) throws unspecified NPE
Date Tue, 05 Dec 2006 12:43:21 GMT
[classlib][awt] MenuItem.dispatchEvent(AWTEvent) throws unspecified NPE
-----------------------------------------------------------------------

                 Key: HARMONY-2460
                 URL: http://issues.apache.org/jira/browse/HARMONY-2460
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


java.awt.MenuItem.dispatchEvent(AWTEvent) throws unspecified NPE while RI does
not.

========= Test =================
import junit.framework.TestCase;
import java.awt.*;

public class test extends TestCase {      
    public void test1 () { 
      MenuItem obj=new MenuItem("ABC");
      obj.dispatchEvent( new AWTEventImpl(new Button(), 1));          
    }      
}

class AWTEventImpl extends AWTEvent{

    public AWTEventImpl(Event event){
        super(event);
    }

    public AWTEventImpl(Object source, int id){
        super(source, id);
    }
}
Output on Sun 1.5:
==================
.
Time: 0

OK (1 test)

Output on Harmony:
==================
.E
Time: 0.203
There was 1 error:
1) test1(test)java.lang.NullPointerException
        at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java:294)
        at java.awt.MenuItem.processEvent(MenuItem.java:356)
        at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:424)
        at test.test1(test.java:7)
        at java.lang.reflect.VMReflection.invokeMethod(Native Method)

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


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