You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Dolgov (JIRA)" <ji...@apache.org> on 2006/12/05 14:46:21 UTC

[jira] Created: (HARMONY-2465) [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not

[classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not
----------------------------------------------------------------------------------

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


Test case:
----------------
import java.awt.AWTEvent;
import java.awt.Component;
import java.awt.MenuItem;

import junit.framework.TestCase;

public class TheTest extends TestCase {

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

    public void testcase1() {
        TestMenuItem mi = new TestMenuItem();
        mi.processEvent((AWTEvent) null);
    }

    public void testcase2() {
        TestComponent c = new TestComponent();
        c.processEvent((AWTEvent) null);
    }     


    static class TestMenuItem extends MenuItem {
        TestMenuItem() {
            super();
        }

        public void processEvent(AWTEvent e) {
            super.processEvent(e);
        }
    }

    static class TestComponent extends Component {
        TestComponent() {
            super();
        }

        public void processEvent(AWTEvent e) {
            super.processEvent(e);
        }
    }
}

RI output:
--------------
..
Time: 0,131

OK (2 tests)


Harmony output:
--------------
.E.E
Time: 0.641
There were 2 errors:
1) testcase1(TheTest)java.lang.NullPointerException
	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
	at java.awt.MenuItem.processEvent(MenuItem.java:367)
	at TheTest$TestMenuItem.processEvent(TheTest.java)
	at TheTest.testcase1(TheTest.java:14)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:10)
2) testcase2(TheTest)java.lang.NullPointerException
	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
	at java.awt.Component.processEvent(Component.java:3630)
	at TheTest$TestComponent.processEvent(TheTest.java)
	at TheTest.testcase2(TheTest.java:19)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:10)

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

        

[jira] Assigned: (HARMONY-2465) [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov reassigned HARMONY-2465:
----------------------------------------

    Assignee: Alexei Zakharov

> [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2465
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2465
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Dolgov
>         Assigned To: Alexei Zakharov
>            Priority: Minor
>
> Test case:
> ----------------
> import java.awt.AWTEvent;
> import java.awt.Component;
> import java.awt.MenuItem;
> import junit.framework.TestCase;
> public class TheTest extends TestCase {
>     public static void main(String args[]) {
>         junit.textui.TestRunner.run(TheTest.class);
>     }
>     public void testcase1() {
>         TestMenuItem mi = new TestMenuItem();
>         mi.processEvent((AWTEvent) null);
>     }
>     public void testcase2() {
>         TestComponent c = new TestComponent();
>         c.processEvent((AWTEvent) null);
>     }
>     public void testcase3() {
>         TestComponent c = new TestComponent();
>         TestEvent e = new TestEvent(c, 2000);
>         c.processEvent(e);
>     }
>     static class TestMenuItem extends MenuItem {
>         TestMenuItem() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     static class TestComponent extends Component {
>         TestComponent() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     class TestEvent extends AWTEvent {
>         public TestEvent(Object source, int id) {
>             super(source, id);
>         }
>     }
> }
> RI output:
> --------------
> ...
> Time: 0,111
> OK (3 tests)
> Harmony output:
> --------------
> .E.E.E
> Time: 0.581
> There were 3 errors:
> 1) testcase1(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.MenuItem.processEvent(MenuItem.java:367)
> 	at TheTest$TestMenuItem.processEvent(TheTest.java)
> 	at TheTest.testcase1(TheTest.java:15)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 2) testcase2(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase2(TheTest.java:20)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 3) testcase3(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase3(TheTest.java:26)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> FAILURES!!!
> Tests run: 3,  Failures: 0,  Errors: 3

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

        

[jira] Commented: (HARMONY-2465) [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466421 ] 

Andrey Pavlenko commented on HARMONY-2465:
------------------------------------------

This issue fixed in HARMONY-2460 and could be closed.

> [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2465
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2465
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Dolgov
>            Priority: Minor
>
> Test case:
> ----------------
> import java.awt.AWTEvent;
> import java.awt.Component;
> import java.awt.MenuItem;
> import junit.framework.TestCase;
> public class TheTest extends TestCase {
>     public static void main(String args[]) {
>         junit.textui.TestRunner.run(TheTest.class);
>     }
>     public void testcase1() {
>         TestMenuItem mi = new TestMenuItem();
>         mi.processEvent((AWTEvent) null);
>     }
>     public void testcase2() {
>         TestComponent c = new TestComponent();
>         c.processEvent((AWTEvent) null);
>     }
>     public void testcase3() {
>         TestComponent c = new TestComponent();
>         TestEvent e = new TestEvent(c, 2000);
>         c.processEvent(e);
>     }
>     static class TestMenuItem extends MenuItem {
>         TestMenuItem() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     static class TestComponent extends Component {
>         TestComponent() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     class TestEvent extends AWTEvent {
>         public TestEvent(Object source, int id) {
>             super(source, id);
>         }
>     }
> }
> RI output:
> --------------
> ...
> Time: 0,111
> OK (3 tests)
> Harmony output:
> --------------
> .E.E.E
> Time: 0.581
> There were 3 errors:
> 1) testcase1(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.MenuItem.processEvent(MenuItem.java:367)
> 	at TheTest$TestMenuItem.processEvent(TheTest.java)
> 	at TheTest.testcase1(TheTest.java:15)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 2) testcase2(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase2(TheTest.java:20)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 3) testcase3(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase3(TheTest.java:26)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> FAILURES!!!
> Tests run: 3,  Failures: 0,  Errors: 3

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

        

[jira] Commented: (HARMONY-2465) [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2465?page=comments#action_12458545 ] 
            
Andrey Pavlenko commented on HARMONY-2465:
------------------------------------------

This issue is similar to http://issues.apache.org/jira/browse/HARMONY-2460

> [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2465
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2465
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Dolgov
>            Priority: Minor
>
> Test case:
> ----------------
> import java.awt.AWTEvent;
> import java.awt.Component;
> import java.awt.MenuItem;
> import junit.framework.TestCase;
> public class TheTest extends TestCase {
>     public static void main(String args[]) {
>         junit.textui.TestRunner.run(TheTest.class);
>     }
>     public void testcase1() {
>         TestMenuItem mi = new TestMenuItem();
>         mi.processEvent((AWTEvent) null);
>     }
>     public void testcase2() {
>         TestComponent c = new TestComponent();
>         c.processEvent((AWTEvent) null);
>     }
>     public void testcase3() {
>         TestComponent c = new TestComponent();
>         TestEvent e = new TestEvent(c, 2000);
>         c.processEvent(e);
>     }
>     static class TestMenuItem extends MenuItem {
>         TestMenuItem() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     static class TestComponent extends Component {
>         TestComponent() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     class TestEvent extends AWTEvent {
>         public TestEvent(Object source, int id) {
>             super(source, id);
>         }
>     }
> }
> RI output:
> --------------
> ...
> Time: 0,111
> OK (3 tests)
> Harmony output:
> --------------
> .E.E.E
> Time: 0.581
> There were 3 errors:
> 1) testcase1(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.MenuItem.processEvent(MenuItem.java:367)
> 	at TheTest$TestMenuItem.processEvent(TheTest.java)
> 	at TheTest.testcase1(TheTest.java:15)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 2) testcase2(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase2(TheTest.java:20)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 3) testcase3(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase3(TheTest.java:26)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> FAILURES!!!
> Tests run: 3,  Failures: 0,  Errors: 3

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

        

[jira] Updated: (HARMONY-2465) [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not

Posted by "Pavel Dolgov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2465?page=all ]

Pavel Dolgov updated HARMONY-2465:
----------------------------------

    Description: 
Test case:
----------------
import java.awt.AWTEvent;
import java.awt.Component;
import java.awt.MenuItem;

import junit.framework.TestCase;

public class TheTest extends TestCase {

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

    public void testcase1() {
        TestMenuItem mi = new TestMenuItem();
        mi.processEvent((AWTEvent) null);
    }

    public void testcase2() {
        TestComponent c = new TestComponent();
        c.processEvent((AWTEvent) null);
    }

    public void testcase3() {
        TestComponent c = new TestComponent();
        TestEvent e = new TestEvent(c, 2000);
        c.processEvent(e);
    }

    static class TestMenuItem extends MenuItem {
        TestMenuItem() {
            super();
        }

        public void processEvent(AWTEvent e) {
            super.processEvent(e);
        }
    }

    static class TestComponent extends Component {
        TestComponent() {
            super();
        }

        public void processEvent(AWTEvent e) {
            super.processEvent(e);
        }
    }

    class TestEvent extends AWTEvent {
        public TestEvent(Object source, int id) {
            super(source, id);
        }
    }
}

RI output:
--------------
...
Time: 0,111

OK (3 tests)


Harmony output:
--------------
.E.E.E
Time: 0.581
There were 3 errors:
1) testcase1(TheTest)java.lang.NullPointerException
	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
	at java.awt.MenuItem.processEvent(MenuItem.java:367)
	at TheTest$TestMenuItem.processEvent(TheTest.java)
	at TheTest.testcase1(TheTest.java:15)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:11)
2) testcase2(TheTest)java.lang.NullPointerException
	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
	at java.awt.Component.processEvent(Component.java:3630)
	at TheTest$TestComponent.processEvent(TheTest.java)
	at TheTest.testcase2(TheTest.java:20)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:11)
3) testcase3(TheTest)java.lang.NullPointerException
	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
	at java.awt.Component.processEvent(Component.java:3630)
	at TheTest$TestComponent.processEvent(TheTest.java)
	at TheTest.testcase3(TheTest.java:26)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:11)

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



  was:
Test case:
----------------
import java.awt.AWTEvent;
import java.awt.Component;
import java.awt.MenuItem;

import junit.framework.TestCase;

public class TheTest extends TestCase {

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

    public void testcase1() {
        TestMenuItem mi = new TestMenuItem();
        mi.processEvent((AWTEvent) null);
    }

    public void testcase2() {
        TestComponent c = new TestComponent();
        c.processEvent((AWTEvent) null);
    }     


    static class TestMenuItem extends MenuItem {
        TestMenuItem() {
            super();
        }

        public void processEvent(AWTEvent e) {
            super.processEvent(e);
        }
    }

    static class TestComponent extends Component {
        TestComponent() {
            super();
        }

        public void processEvent(AWTEvent e) {
            super.processEvent(e);
        }
    }
}

RI output:
--------------
..
Time: 0,131

OK (2 tests)


Harmony output:
--------------
.E.E
Time: 0.641
There were 2 errors:
1) testcase1(TheTest)java.lang.NullPointerException
	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
	at java.awt.MenuItem.processEvent(MenuItem.java:367)
	at TheTest$TestMenuItem.processEvent(TheTest.java)
	at TheTest.testcase1(TheTest.java:14)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:10)
2) testcase2(TheTest)java.lang.NullPointerException
	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
	at java.awt.Component.processEvent(Component.java:3630)
	at TheTest$TestComponent.processEvent(TheTest.java)
	at TheTest.testcase2(TheTest.java:19)
	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
	at TheTest.main(TheTest.java:10)

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




> [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2465
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2465
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Dolgov
>            Priority: Minor
>
> Test case:
> ----------------
> import java.awt.AWTEvent;
> import java.awt.Component;
> import java.awt.MenuItem;
> import junit.framework.TestCase;
> public class TheTest extends TestCase {
>     public static void main(String args[]) {
>         junit.textui.TestRunner.run(TheTest.class);
>     }
>     public void testcase1() {
>         TestMenuItem mi = new TestMenuItem();
>         mi.processEvent((AWTEvent) null);
>     }
>     public void testcase2() {
>         TestComponent c = new TestComponent();
>         c.processEvent((AWTEvent) null);
>     }
>     public void testcase3() {
>         TestComponent c = new TestComponent();
>         TestEvent e = new TestEvent(c, 2000);
>         c.processEvent(e);
>     }
>     static class TestMenuItem extends MenuItem {
>         TestMenuItem() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     static class TestComponent extends Component {
>         TestComponent() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     class TestEvent extends AWTEvent {
>         public TestEvent(Object source, int id) {
>             super(source, id);
>         }
>     }
> }
> RI output:
> --------------
> ...
> Time: 0,111
> OK (3 tests)
> Harmony output:
> --------------
> .E.E.E
> Time: 0.581
> There were 3 errors:
> 1) testcase1(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.MenuItem.processEvent(MenuItem.java:367)
> 	at TheTest$TestMenuItem.processEvent(TheTest.java)
> 	at TheTest.testcase1(TheTest.java:15)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 2) testcase2(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase2(TheTest.java:20)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 3) testcase3(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase3(TheTest.java:26)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> FAILURES!!!
> Tests run: 3,  Failures: 0,  Errors: 3

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

        

[jira] Closed: (HARMONY-2465) [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov closed HARMONY-2465.
------------------------------------

    Resolution: Fixed

Cannot reproduce it on the current Harmony snapshot. 

> [classlib][awt] java.awt.Component.processEvent(null) throws NPE while RI does not
> ----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2465
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2465
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Dolgov
>         Assigned To: Alexei Zakharov
>            Priority: Minor
>
> Test case:
> ----------------
> import java.awt.AWTEvent;
> import java.awt.Component;
> import java.awt.MenuItem;
> import junit.framework.TestCase;
> public class TheTest extends TestCase {
>     public static void main(String args[]) {
>         junit.textui.TestRunner.run(TheTest.class);
>     }
>     public void testcase1() {
>         TestMenuItem mi = new TestMenuItem();
>         mi.processEvent((AWTEvent) null);
>     }
>     public void testcase2() {
>         TestComponent c = new TestComponent();
>         c.processEvent((AWTEvent) null);
>     }
>     public void testcase3() {
>         TestComponent c = new TestComponent();
>         TestEvent e = new TestEvent(c, 2000);
>         c.processEvent(e);
>     }
>     static class TestMenuItem extends MenuItem {
>         TestMenuItem() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     static class TestComponent extends Component {
>         TestComponent() {
>             super();
>         }
>         public void processEvent(AWTEvent e) {
>             super.processEvent(e);
>         }
>     }
>     class TestEvent extends AWTEvent {
>         public TestEvent(Object source, int id) {
>             super(source, id);
>         }
>     }
> }
> RI output:
> --------------
> ...
> Time: 0,111
> OK (3 tests)
> Harmony output:
> --------------
> .E.E.E
> Time: 0.581
> There were 3 errors:
> 1) testcase1(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.MenuItem.processEvent(MenuItem.java:367)
> 	at TheTest$TestMenuItem.processEvent(TheTest.java)
> 	at TheTest.testcase1(TheTest.java:15)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 2) testcase2(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase2(TheTest.java:20)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> 3) testcase3(TheTest)java.lang.NullPointerException
> 	at java.awt.AWTEvent$EventTypeLookup.getEventMask(AWTEvent.java)
> 	at java.awt.Component.processEvent(Component.java:3630)
> 	at TheTest$TestComponent.processEvent(TheTest.java)
> 	at TheTest.testcase3(TheTest.java:26)
> 	at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> 	at TheTest.main(TheTest.java:11)
> FAILURES!!!
> Tests run: 3,  Failures: 0,  Errors: 3

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