You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Loenko (JIRA)" <ji...@apache.org> on 2006/10/20 13:37:37 UTC

[jira] Resolved: (HARMONY-1496) [classlib][awt] Dimension.setSize(double, double) rounding algorithm differs from RI

     [ 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