You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "sergey krivenko (JIRA)" <ji...@apache.org> on 2007/01/11 13:45:28 UTC

[jira] Updated: (HARMONY-2888) [classlib][swing] javax.swing.plaf.basic.BasicTabbedPaneUI.createScrollButton(int) does not throw IllegalArgumentException in case of incorrect direction

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

sergey krivenko updated HARMONY-2888:
-------------------------------------

    Attachment: Harmony-2888-BasicTabbedPaneUI.patch

> [classlib][swing] javax.swing.plaf.basic.BasicTabbedPaneUI.createScrollButton(int) does not throw IllegalArgumentException in case of incorrect direction
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2888
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2888
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>            Priority: Minor
>         Attachments: Harmony-2888-BasicTabbedPaneUI.patch
>
>
> Specification says that this method should throw IllegalArgumentException, if direction is not one of NORTH, SOUTH, EAST or WEST. But Harmony does not throw IllegalArgumentException instead of RI.
> Test to reproduce:
> ---------------------------------------------
> import javax.swing.*;
> import javax.swing.plaf.basic.*;
> class lBasicTabbedPaneUI extends BasicTabbedPaneUI {
>         public lBasicTabbedPaneUI() {
>                 super();
>         }
>         public JButton createScrollButton(int direction) {
>                 return super.createScrollButton(direction);
>         }
> }
> public class TestForBugReproduce    
> {
>         public static void main(String args[]) {
>                 lBasicTabbedPaneUI localBasicTabbedPaneUI = new
> lBasicTabbedPaneUI();
>                 int localVariable0 = 80;
>                 JButton returnValue =
> localBasicTabbedPaneUI.createScrollButton(localVariable0);
>                 System.out.println("Ok");
>         }
> }
> ----------------------------------
> Output on RI:
> ===========
> Exception in thread "main" java.lang.IllegalArgumentException: Direction must
> be one of: SOUTH, NORTH, EAST or WEST
>         at
> javax.swing.plaf.basic.BasicTabbedPaneUI.createScrollButton(BasicTabbedPaneUI.java:275)
>         at lBasicTabbedPaneUI.createScrollButton(TestForBugReproduce.java:9)
>         at TestForBugReproduce.main(TestForBugReproduce.java:19)
> Output on Harmony:
> ================
> Ok

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