harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Simbirtsev (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2701) [classlib][swing] javax.swing.plaf.basic.BasicProgressBarUI.getBoxLength(int, int) returns value greater than RI returns
Date Thu, 14 Dec 2006 14:30:26 GMT
[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


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

        

Mime
View raw message