You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2007/01/15 21:49:27 UTC

[jira] Closed: (HARMONY-2460) [classlib][awt] MenuItem.dispatchEvent(AWTEvent) throws unspecified NPE

     [ https://issues.apache.org/jira/browse/HARMONY-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Hindess closed HARMONY-2460.
---------------------------------


Verified.  Thanks.

> [classlib][awt] MenuItem.dispatchEvent(AWTEvent) throws unspecified NPE
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-2460
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2460
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Mark Hindess
>         Attachments: AWTEvent.patch, EventTest.patch
>
>
> 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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira