Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The test functional/org/apache/harmony/test/func/api/java/text/DecimalFormat/DecimalFormatTest.xml fails with the following output.
22:55:46| DecimalFormat.format(double) returns incorrect value
Expected:'B@C'@DH'AED'BDG'HFH'BH?'
Returned:'B@C'@DH'AED'BDG'HFH'C??'
The problem here that the the test expects the wrong value to be returned by DecimalFormat.format(double). The right one is 'B@C'@DH'AED'BDG'HFH'C??'
The point is that RI has a bug in Double.toString(double) implementation. Thus for the double which is exploited by the test, 3.141592653589794E17 RI implementation of this method returns 3.1415926535897939E17 while Harmony returns 3.141592653589794E17. The latter is correct string.
Current test expects the same value as returned by RI.