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/16 15:22:27 UTC

[jira] Commented: (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:comment-tabpanel#action_12465164 ] 

Sergey Krivenko commented on HARMONY-2888:
------------------------------------------

It's working.

> [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
>         Assigned To: Mark Hindess
>            Priority: Minor
>         Attachments: Harmony-2888-BasicTabbedPaneUI.patch, Harmony-2888-BasicTabbedPaneUITest.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