harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2535) [classlib][swing] JSlider(int) expected IAE if orientation is invalid
Date Mon, 15 Jan 2007 07:46:27 GMT

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

Alexei Zakharov updated HARMONY-2535:
-------------------------------------

    Patch Info: [Patch Available]

> [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
>         Attachments: Harmony-2535-Test.patch, Harmony-2535.patch
>
>
> 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

        

Mime
View raw message