harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Okomin (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2888) [classlib][swing] javax.swing.plaf.basic.BasicTabbedPaneUI.createScrollButton(int) does not throw IllegalArgumentException in case of incorrect direction
Date Wed, 27 Dec 2006 09:43:21 GMT
[classlib][swing] javax.swing.plaf.basic.BasicTabbedPaneUI.createScrollButton(int) does not
throw IllegalArgumentException in case of incorrect direction
---------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2888
                 URL: http://issues.apache.org/jira/browse/HARMONY-2888
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ilya Okomin
            Priority: Minor


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

        

Mime
View raw message