Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4134034

java.text.DecimalFormat does not zero suppress

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.1.6
    • Fix Version/s: 1.2.0
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.2beta4
    • CPU:
      sparc
    • OS:
      solaris_2.5.1
    • Verification:
      Verified

      Description

      The java.text.DecimalFormat class no longer zero suppresses # symbols.

      In the below example the data should be display
      as 9.02 & .00 not as 09.02 & 00.00


      import java.text.DecimalFormat;

      public class bug {
        public static void main (String args[]) {
          DecimalFormat nf = new DecimalFormat("##,###,###.00");

          System.out.println(nf.format(9.02));
          System.out.println(nf.format(0));
        }
      }

        Attachments

          Activity

            People

            Assignee:
            aliusunw Alan Liu (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: