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/16 14:58:27 UTC
[jira] Closed: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess closed HARMONY-2903.
---------------------------------
Verified. Thanks.
> [classlib][swing] j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
> -------------------------------------------------------------------------------------
>
> Key: HARMONY-2903
> URL: https://issues.apache.org/jira/browse/HARMONY-2903
> Project: Harmony
> Issue Type: Bug
> Components: Classlib, Non-bug differences from RI
> Reporter: Alexey A. Ivanov
> Assigned To: Mark Hindess
> Priority: Minor
> Attachments: Harmony-2903-Make.patch, Harmony-2903-Test.patch, Harmony-2903-Test.patch, Harmony-2903.patch
>
>
> javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(int) returns non-null icon whereas RI throws NPE:
> java.lang.NullPointerException
> at sun.swing.DefaultLookup.get(DefaultLookup.java:81)
> at javax.swing.plaf.basic.BasicOptionPaneUI.getIconForType(BasicOptionPaneUI.java:551)
> at Test$TestBasicOptionPaneUI.getIconForType(Test.java:8)
> at Test.main(Test.java:14)
> Note: if UI is associated with a JOptionPane, then RI returns an icon too and no exception is thrown.
> (Add the following line before System.out:
> bop.installUI(new JOptionPane());
> )
> ======= Code to Reproduce =======
> import javax.swing.Icon;
> import javax.swing.plaf.basic.BasicOptionPaneUI;
> public class Test {
> private static class TestBasicOptionPaneUI extends BasicOptionPaneUI {
> @Override
> public Icon getIconForType(int i) {
> return super.getIconForType(i);
> }
> }
> public static void main(String[] args) {
> TestBasicOptionPaneUI bop = new TestBasicOptionPaneUI();
> System.out.println(bop.getIconForType(0));
> }
> }
> ======= end of code =======
--
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