harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2844) [classlib][swing] j.s.undo.StateEdit.init does not throw NPE on Harmony
Date Fri, 22 Dec 2006 11:02:21 GMT
[classlib][swing] j.s.undo.StateEdit.init does not throw NPE on Harmony

                 Key: HARMONY-2844
                 URL: http://issues.apache.org/jira/browse/HARMONY-2844
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Alexey A. Ivanov
            Priority: Minor

javax.swing.undo.StateEdit.init with null object parameter does not throw NPE on Harmony whereas
it does on RI.

======= Code to Reproduce =======
import java.util.Hashtable;

import javax.swing.undo.StateEdit;
import javax.swing.undo.StateEditable;

public class Test {
    private static class TestStateEditable implements StateEditable {
        public void restoreState(Hashtable< ? , ? > ht) {

        public void storeState(Hashtable<Object, Object> arg0) {

    private static class TestStateEdit extends StateEdit {
        public TestStateEdit(StateEditable anObject) {

        public void init(StateEditable anObject, String name) {
            super.init(anObject, name);

    public static void main(String[] args) {
        StateEditable stateEditable = new TestStateEditable();
        TestStateEdit stateEdit = new TestStateEdit(stateEditable);
        stateEdit.init(null, "name");
======= end of code =======

No output when run on Harmony.

RI prints:
	at javax.swing.undo.StateEdit.init(StateEdit.java:103)
	at Test$TestStateEdit.init(Test.java:22)
	at Test.main(Test.java:29)

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