You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/12/08 10:58:21 UTC

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

[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

        

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

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov closed HARMONY-2535.
------------------------------------


verified by Vasily

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


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

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469469 ] 

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

Thanks, Alexei, the patch is fine.


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


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

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vasily Zakharov updated HARMONY-2535:
-------------------------------------

    Attachment: Harmony-2535-Test.patch
                Harmony-2535.patch

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

        

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

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464060 ] 

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

Added fix and test patches.


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

        

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

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov resolved HARMONY-2535.
--------------------------------------

    Resolution: Fixed

Thanks guys, the patch was applied at the revision 502197. Please verify.

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


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

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ 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