You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexander Simbirtsev (JIRA)" <ji...@apache.org> on 2006/12/14 15:36:24 UTC

[jira] Updated: (HARMONY-2701) [classlib][swing] javax.swing.plaf.basic.BasicProgressBarUI.getBoxLength(int, int) returns value greater than RI returns

     [ http://issues.apache.org/jira/browse/HARMONY-2701?page=all ]

Alexander Simbirtsev updated HARMONY-2701:
------------------------------------------

    Attachment: BasicProgressBarUI-patch.txt

Here's the proposed fix

> [classlib][swing] javax.swing.plaf.basic.BasicProgressBarUI.getBoxLength(int, int) returns value greater than RI returns
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2701
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2701
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexander Simbirtsev
>         Attachments: BasicProgressBarUI-patch.txt
>
>
> Compatibility
> According to specification for getBoxLength(int availableLength,
> int otherDimension))the method "returns the size of the box dimension being
> determined; must be no larger than availableLength"
> Use the following code to reproduce:
> import javax.swing.plaf.basic.BasicProgressBarUI;
> import junit.framework.TestCase;
> public class Test extends TestCase {
>     public void testcase1() {                                    
>         testBasicProgressBarUI pb = new testBasicProgressBarUI();   
>         assertEquals(0, pb.getBoxLength(0, 1));            
>     }                                                                        
>     public void testcase2() {                                    
>         testBasicProgressBarUI pb = new testBasicProgressBarUI();   
>         assertEquals(8, pb.getBoxLength(50, 1));            
>     }                                                                        
> }
> class testBasicProgressBarUI extends BasicProgressBarUI {
>     public int getBoxLength(int a, int b)  {
>         return super.getBoxLength(a, b);        
>     } 
> }

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