harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-2766) [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does
Date Wed, 14 Mar 2007 14:22:10 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Petrenko closed HARMONY-2766.
------------------------------------


> [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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message