harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1496) [classlib][awt] Dimension.setSize(double, double) rounding algorithm differs from RI
Date Tue, 19 Sep 2006 13:23:22 GMT
[classlib][awt] Dimension.setSize(double, double) rounding algorithm differs from RI
------------------------------------------------------------------------------------

                 Key: HARMONY-1496
                 URL: http://issues.apache.org/jira/browse/HARMONY-1496
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


Harmony implementation rounds input parameters using Math.rint while RI use Math.ceil as follows
from test below. Spec doesn't explain rounding algorithm.

=============== Test.java ============
import java.awt.Dimension;

public class Test {
    static public void main(String[] args) {
        Dimension d = new Dimension();
        d.setSize(4.3, 5.7);
        System.out.println(d);        
    }
}

========= RI outoput ==========
java.awt.Dimension[width=5,height=6]

========== Harmony output ====
java.awt.Dimension[width=4,height=6]


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