harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Okomin (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2895) [classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null) does not throw unspecified NPE
Date Wed, 27 Dec 2006 12:39:21 GMT
[classlib][swing] Compatibility: javax.swing.plaf.basic.BasicFileChooserUI.getApproveButtonMnemonic(null)
does not throw unspecified NPE
----------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2895
                 URL: http://issues.apache.org/jira/browse/HARMONY-2895
             Project: Harmony
          Issue Type: Bug
          Components: Non-bug differences from RI
            Reporter: Ilya Okomin
            Priority: Minor


There is no mention of any exception in the specification. But RI throws unspecified NPE for
getApproveButtonMnemonic(null) while Harmony does not.
Test case to reproduce, that passes on RI and fails on Harmony:
----------- test.java ----------------
import javax.swing.JFileChooser;
import javax.swing.plaf.basic.BasicFileChooserUI;

import junit.framework.TestCase;
import junit.textui.TestRunner;

public class test extends TestCase {

    public static void main(String args[]) {
        TestRunner.run(test.class);
    }

    public void testRun() {
        try {
            BasicFileChooserUI cb = new BasicFileChooserUI(new JFileChooser());
            cb.getApproveButtonMnemonic(null);
            fail("NullPointerException expected");
        } catch (NullPointerException e) {
            // expected
        }
    }
}
----------------------------------------

I suppose this case can be treated as non-bug difference.
Note: The same case with getApproveButtonToolTipText(null) and cb.getApproveButtonText((JFileChooser)
null).

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