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-2765) [classlib][swing] javax.swing.plaf.basic.BasicInternalFrameUI. createNorthPane(null) does not throw unspecified NPE
Date Mon, 18 Dec 2006 11:24:21 GMT
[classlib][swing] javax.swing.plaf.basic.BasicInternalFrameUI. createNorthPane(null) does not
throw unspecified NPE
-------------------------------------------------------------------------------------------------------------------

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


There is no mention of any exception in the specification.
RI throws unspecified NPE for createNorthPane(null) while Harmony does not.

Note, both RI and Harmony don't throw NPE for
createSouthPane(null)
createEastPane(null)
createWestPane(null).

import javax.swing.plaf.basic.*;
import javax.swing.*;

public class test {
    public static void main(String[] args) {               
        try {   
            testBasicInternalFrameUI fr = new testBasicInternalFrameUI(null);
            fr.createNorthPane(null);   
        } catch (Exception e) { 
            e.printStackTrace();
        } 
    }                                                                        
}
class testBasicInternalFrameUI  extends BasicInternalFrameUI {
     testBasicInternalFrameUI (JInternalFrame c){
         super(c);  
     }
     public JComponent createNorthPane(JInternalFrame  c)  {
         return super.createNorthPane(c);       
     }      
}

Output on RI:
java.lang.NullPointerException
        at
javax.swing.plaf.basic.BasicInternalFrameTitlePane.installListeners(BasicInternalFrameTitlePane.java:139)
        at
javax.swing.plaf.basic.BasicInternalFrameTitlePane.installTitlePane(BasicInternalFrameTitlePane.java:98)
        at
javax.swing.plaf.basic.BasicInternalFrameTitlePane.<init>(BasicInternalFrameTitlePane.java:93)
        at
javax.swing.plaf.basic.BasicInternalFrameUI.createNorthPane(BasicInternalFrameUI.java:332)
        at testBasicInternalFrameUI.createNorthPane(test.java:31)
        at test.main(test.java:8)

Output on Harmony +j9:
(no output)



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