harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2536) [classlib][swing] javax.swing.undo.StateEdit(null) does not throw NPE while RI does
Date Fri, 08 Dec 2006 10:02:24 GMT
[classlib][swing] javax.swing.undo.StateEdit(null) does not throw NPE while RI does
-----------------------------------------------------------------------------------

                 Key: HARMONY-2536
                 URL: http://issues.apache.org/jira/browse/HARMONY-2536
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message