JDK-4490929 : BigDecimal("1E" + Integer.MIN_VALUE) throws erroneous exception
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.math
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2001-08-10
  • Updated: 2001-11-23
  • Resolved: 2001-09-14
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
1.4.0 beta3Fixed
Related Reports
Relates :  
Description
The specs for BigDecimal string constructor state that "The value of the exponenet must lie between Integer.MIN_VALUE and Integer.MAX_VALUE, inclusive."  However, a call 

BigDecimal("1E" + Integer.MIN_VALUE)

fails with a java.lang.ArithmeticException: Negative exponent from the BigInteger.pow method.

Either the spec should be changed on the JavaDoc should be modified.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta3 FIXED IN: merlin-beta3 INTEGRATED IN: merlin-beta3 VERIFIED IN: merlin-beta3 merlin-rc1
14-06-2004

EVALUATION The spec should be changed to only allow exponents in the range +/-Integer.MAX_VALUE. ###@###.### 2001-08-22
22-08-2001