JDK-6268365 : BigDecimal text constructors set wrong precision for significands with leading non-ASCII zeros
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.math
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-05-11
  • Updated: 2010-04-02
  • Resolved: 2005-07-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u5Fixed 6 b45Fixed
Related Reports
Relates :  
Description
If one of the BigDecimal constructors that converts text to numbers has a significand field with leading non-ASCII zeros, then the precision of the number is set incorrectly, which can lead to improper behavior.

###@###.### 2005-05-11 01:24:18 GMT

Comments
EVALUATION Responding to a JDC comment which added a program without comment, presumably the point of the program is that BigDecimal decimal_2 = new BigDecimal( 1.05d ); and BigDecimal decimal_3 = new BigDecimal( "1.05" ); result in different values. While this may be surprising at first blush, why this can occur is explained in the javadoc for the double constructor. The observed behavior in the program in the comment is correct and unrelated to this bug.
09-01-2006

EVALUATION Should be fixed. ###@###.### 2005-05-11 01:43:43 GMT
11-05-2005

SUGGESTED FIX See 6177836 for code changes. ###@###.### 2005-07-11 19:57:48 GMT
11-05-2005