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/14 22:15:27 UTC
[jira] Resolved: (HARMONY-2766) [classlib][swing]
javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw
unspecified NPE while RI does
[ https://issues.apache.org/jira/browse/HARMONY-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess resolved HARMONY-2766.
-----------------------------------
Resolution: Fixed
Assignee: Mark Hindess
Applied patches in r496153. Please confirm they have been applied as expected.
> [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does
> -----------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2766
> URL: https://issues.apache.org/jira/browse/HARMONY-2766
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Mark Hindess
> Attachments: H2766-BasicListUI.patch, H2766-BasicListUITest.patch
>
>
> There is no mention of any exception in the specification for getCellBounds(JList list,int index1, int index2).
> Harmony throws unspecified NPE if JList == null and index1>0. RI also throws NPE.
> But Harmony does not throw NPE if JList == null and index1<0 while RI does.
> import javax.swing.plaf.basic.BasicListUI;
> import javax.swing.UIDefaults;
> import javax.swing.*;
> public class test {
> public static void main(String[] args) {
> try {
> BasicListUI bl = new BasicListUI();
> bl.getCellBounds((JList) null, -1, 9);
> } catch (Exception e) {
> e.printStackTrace();
> }
> try {
> BasicListUI bl = new BasicListUI();
> bl.getCellBounds((JList) null, 1, 9);
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> Output on RI:
> java.lang.NullPointerException
> at
> javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1125)
> at
> javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1105)
> at
> javax.swing.plaf.basic.BasicListUI.getCellBounds(BasicListUI.java:746)
> at test.main(test.java:10)
> java.lang.NullPointerException
> at
> javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1125)
> at
> javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1105)
> at
> javax.swing.plaf.basic.BasicListUI.getCellBounds(BasicListUI.java:746)
> at test.main(test.java:16)
> Output on Harmony +j9:
> java.lang.NullPointerException
> at
> javax.swing.plaf.basic.BasicListUI.getCellBounds(BasicListUI.java:375)
> at test.main(test.java:16)
--
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