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] Closed: (HARMONY-2844) [classlib][swing] j.s.undo.StateEdit.init does not throw NPE on Harmony
Date Wed, 07 Feb 2007 11:41:05 GMT

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

Alexey A. Ivanov closed HARMONY-2844.
-------------------------------------


Oh, sorry, I haven't update the local copy completely.

Everything's fine.

> [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
>         Assigned To: Alexey Petrenko
>            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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message