harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2844) [classlib][swing] j.s.undo.StateEdit.init does not throw NPE on Harmony
Date Mon, 15 Jan 2007 08:43:27 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464694
] 

Mark Hindess commented on HARMONY-2844:
---------------------------------------

The regression test passes for me without applying the fix?


> [classlib][swing] j.s.undo.StateEdit.init does not throw NPE on Harmony
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-2844
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2844
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>            Priority: Minor
>         Attachments: H2844-StateEdit.patch, H2844-StateEditTest.patch
>
>
> 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) {
>             super(anObject);
>         }
>         @Override
>         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:
> java.lang.NullPointerException
> 	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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message