You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2007/01/09 16:19:29 UTC

[jira] Commented: (HARMONY-2535) [classlib][swing] JSlider(int) expected IAE if orientation is invalid

    [ https://issues.apache.org/jira/browse/HARMONY-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463313 ] 

Vasily Zakharov commented on HARMONY-2535:
------------------------------------------

I'll look into this issue.


> [classlib][swing] JSlider(int) expected IAE if orientation is invalid
> ---------------------------------------------------------------------
>
>                 Key: HARMONY-2535
>                 URL: https://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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira