You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey A. Ivanov (JIRA)" <ji...@apache.org> on 2006/12/27 16:41:21 UTC
[jira] Created: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
[classlib][swing] j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
-------------------------------------------------------------------------------------
Key: HARMONY-2903
URL: http://issues.apache.org/jira/browse/HARMONY-2903
Project: Harmony
Issue Type: Bug
Components: Classlib, Non-bug differences from RI
Reporter: Alexey A. Ivanov
Priority: Minor
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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-2903:
-------------------------------------
Attachment: Harmony-2903-Test.patch
> [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
> 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
[jira] Updated: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov updated HARMONY-2903:
-------------------------------------
Patch Info: [Patch Available]
> [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
> Priority: Minor
> Attachments: Harmony-2903-Make.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
[jira] Commented: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463369 ]
Vasily Zakharov commented on HARMONY-2903:
------------------------------------------
Attached fix and test patches.
Also attached a make patch to remove javax.swing.plaf.basic.BasicOptionPaneUITest from exclude list.
I'm not sure if this should be applied permanently as testGetIconForType test case it contains fails for now (independently of this issue).
> [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
> Priority: Minor
> Attachments: Harmony-2903-Make.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
[jira] Commented: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464993 ]
Vasily Zakharov commented on HARMONY-2903:
------------------------------------------
I've changed the patch, moved the check to a separate test.
testGetIconForType still fails, as you described, so javax.swing.plaf.basic.BasicOptionPaneUITest should not probably be removed from exclude list for now.
> [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
> 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
[jira] Resolved: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess resolved HARMONY-2903.
-----------------------------------
Resolution: Fixed
Assignee: Mark Hindess
Applied patches in r496644. Please confirm they have been applied as expected.
> [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
[jira] Commented: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465160 ]
Alexey A. Ivanov commented on HARMONY-2903:
-------------------------------------------
That's OK with me.
Thank you Vasily and Mark.
> [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
[jira] Commented: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465155 ]
Vasily Zakharov commented on HARMONY-2903:
------------------------------------------
Thanks Mark, the patch is fine.
> [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
[jira] Commented: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464869 ]
Mark Hindess commented on HARMONY-2903:
---------------------------------------
I tried applying the test patch but it fails before getting to the new part. I fails on the line:
assertEquals(icon11, icon12);
> [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
> Priority: Minor
> Attachments: Harmony-2903-Make.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
[jira] Updated: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-2903:
-------------------------------------
Attachment: Harmony-2903-Make.patch
Harmony-2903-Test.patch
Harmony-2903.patch
> [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
> Priority: Minor
> Attachments: Harmony-2903-Make.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
[jira] Closed: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ 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
[jira] Commented: (HARMONY-2903) [classlib][swing]
j.s.plaf.basic.BasicOptionPaneUI.getIconForType() doesn't throw NPE
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463298 ]
Vasily Zakharov commented on HARMONY-2903:
------------------------------------------
I'll look into this issue.
> [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
> Priority: Minor
>
> 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