harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2536) [classlib][swing] javax.swing.undo.StateEdit(null) does not throw NPE while RI does
Date Sun, 14 Jan 2007 22:08:27 GMT

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

Vasily Zakharov commented on HARMONY-2536:
------------------------------------------

Thanks Mark, the patch is fine.


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

        

Mime
View raw message