harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-1496) [classlib][awt] Dimension.setSize(double, double) rounding algorithm differs from RI
Date Fri, 20 Oct 2006 11:37:37 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1496?page=all ]

Mikhail Loenko resolved HARMONY-1496.
-------------------------------------

    Resolution: Fixed

patch applied in revision 466070
Denis, please check that it was applied as expected

> [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
>         Assigned To: Mikhail Loenko
>         Attachments: 1496-Dimension.patch
>
>
> 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