You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/12/18 12:35:22 UTC

[jira] Created: (HARMONY-2766) [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does

[classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does
-----------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2766
                 URL: http://issues.apache.org/jira/browse/HARMONY-2766
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2766) [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does

Posted by "Denis Kishenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2766?page=all ]

Denis Kishenko updated HARMONY-2766:
------------------------------------

    Patch Info: [Patch Available]

> [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2766
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2766
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-2766) [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (HARMONY-2766) [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2766?page=all ]

Alexey A. Ivanov updated HARMONY-2766:
--------------------------------------

    Attachment: H2766-BasicListUITest.patch
                H2766-BasicListUI.patch

Regression test case and the fix.

I've just placed component installation above other parameters validation.

> [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2766
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2766
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-2766) [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] Commented: (HARMONY-2766) [classlib][swing] javax.swing.plaf.basic.BasicListUI.getCellBounds() does not throw unspecified NPE while RI does

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472584 ] 

Alexey A. Ivanov commented on HARMONY-2766:
-------------------------------------------

Everything's fine.
Thank you, Mark.

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