-
Bug
-
Resolution: Fixed
-
P4
-
1.1.4
-
1.1.6
-
sparc
-
solaris_2.5
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2017924 | 1.2.0 | John Oconner | P4 | Resolved | Fixed | 1.2beta3 |
Name: dfC67450 Date: 11/13/97
java.text.DecimalFormat.parse(String text, ParsePosition pp) incorrectly parses
Long.MIN_VALUE if multiplier is not set to 1.
Here is the test demonstrating the bug:
-----------------TestP.java------------------------
import java.text.*;
public class TestP {
public static void main (String args[]){
DecimalFormat df = new DecimalFormat();
String str = Long.toString(Long.MIN_VALUE);
System.out.println(df.parse(str, new ParsePosition(0)));
df.setMultiplier(100);
System.out.println(df.parse(str, new ParsePosition(0)));
}
}
---------Output from the test---------------------
-9223372036854775808
9.223372036854776E16
--------------------------------------------------
======================================================================
- backported by
-
JDK-2017924 java.text.DecimalFormat.parse() fails when multiplier is not set to 1
- Resolved