-
Bug
-
Resolution: Fixed
-
P3
-
1.1.6
-
1.1.6
-
sparc
-
solaris_2.5
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2018504 | 1.2.0 | John Oconner | P3 | Resolved | Fixed | 1.2beta3 |
Name: avC70361 Date: 12/29/97
The java.text.DecimalFormat.applyPattern(String pattern) doesn't set minimum
integer digits correctly. For example, when applying "#,##0" pattern minimum
integer digits should be equal to 1, but getMinimumIntegerDigits() returns 0.
Here is the test demonstrating the bug.
---------Test.java------------------------
import java.text.*;
public class Test {
public static void main (String args[]){
DecimalFormat sdf = new DecimalFormat();
String pattern = "#,##0";
System.out.println("Applying pattern " + pattern);
sdf.applyPattern(pattern);
System.out.println("Minimum integer digits : " +sdf.getMinimumIntegerDigits());
System.out.println("Pattern :" + sdf.toPattern());
}
}
----------The output from the test--------
#> java Test
Applying pattern #,##0
Minimum integer digits : 0
Pattern :#,###
------------------------------------------
======================================================================
- backported by
-
JDK-2018504 java.text.DecimalFormat.applyPattern doesn't set minimum integer digits
-
- Resolved
-
- relates to
-
JDK-4139344 java.text.DecimalFormat.applyPattern doesn't set minimum integer digits
-
- Closed
-
-
JDK-4147706 java.text.DecimalFormat.format(double d) incorrectly works with -0.0
-
- Closed
-
-
JDK-4147295 java.text.DecimalFormat.applyPattern doesn't set minimum integer digits
-
- Closed
-