JDK-4101481 : java.text.DecimalFormat.applyPattern doesn't set minimum integer digits
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.1.6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.5
  • CPU: sparc
  • Submitted: 1997-12-29
  • Updated: 1998-08-14
  • Resolved: 1998-08-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 Other
1.1.6 1.1.6Fixed 1.2.0Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description

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 :#,###
------------------------------------------
======================================================================

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

EVALUATION fixed by Taligent
11-06-2004