harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2535) [classlib][swing] JSlider(int) expected IAE if orientation is invalid
Date Fri, 08 Dec 2006 09:58:21 GMT
[classlib][swing] JSlider(int) expected IAE if orientation is invalid
---------------------------------------------------------------------

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


There is no mention about any exception in the specification. 
But obviously constructor JSlider(int orientation) is particular case of  public JSlider(int
orientation, int min,int max,int value)constructor.
Specification for last one reads:
Constructor throws: 
IllegalArgumentException - if orientation is not one of VERTICAL, HORIZONTAL.

Harmony does not throw an exception while RI does.

import javax.swing.*;

public class test {
    public static void main(String[] args) {                              
           JSlider s=new JSlider(2);
           System.out.println(s.getOrientation());                      
    }                                                                        
}
Output on RI:
java.lang.IllegalArgumentException: orientation must be one of: VERTICAL,
HORIZONTAL
        at javax.swing.JSlider.checkOrientation(JSlider.java:137)
        at javax.swing.JSlider.<init>(JSlider.java:190)
        at javax.swing.JSlider.<init>(JSlider.java:156)
        at test.main(test.java:12)

Output on Harmony:
2


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