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 14:36:27 UTC

[jira] Closed: (HARMONY-2536) [classlib][swing] javax.swing.undo.StateEdit(null) does not throw NPE while RI does

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

Mark Hindess closed HARMONY-2536.
---------------------------------


Verified by Denis.  Thanks.

> [classlib][swing] javax.swing.undo.StateEdit(null) does not throw NPE while RI does
> -----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2536
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2536
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Mark Hindess
>         Attachments: Harmony-2536-Test.patch, Harmony-2536.patch
>
>
> There is no mention of any exception in the specification.RI throws NPE for StateEdit(null) and StateEdit(null, "str") while Harmony does not.
> import javax.swing.undo.*;
> public class test { 
>     public static void main(String[] args) {                             
>         try {  
>            StateEdit localStateEdit = new StateEdit(null);
>            System.out.println("Test1 failed");                          
>         } catch (NullPointerException e){  
>             System.out.println("Test1 passed");                      
>         } catch (Throwable t){                        
>             t.printStackTrace();
>         }
>         try {  
>            StateEdit localStateEdit = new StateEdit(null,"str");
>            System.out.println("Test2 failed");                                 
>         } catch (NullPointerException e){  
>             System.out.println("Test2 passed");                      
>         } catch (Throwable t){                 
>             t.printStackTrace();
>         }                
>     }                                                                        
> }
> Harmony output:
> Test1 failed
> Test2 failed
> RI output:
> Test1 passed
> Test2 passed

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