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

[jira] Assigned: (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:all-tabpanel ]

Alexei Zakharov reassigned HARMONY-2535:
----------------------------------------

    Assignee: Alexei Zakharov

> [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
>         Assigned To: Alexei Zakharov
>         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.
-
You can reply to this email to add a comment to the issue online.