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

[Fmt-Nu] Doc: DecimalFormat specification is insufficient

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.3.0
    • core-libs
    • Fix Understood
    • generic
    • generic

      The specification of java.text.DecimalFormat is insufficient in several areas:

      - It is nowhere specified how maximumIntegerDigits, minimumIntegerDigits, maximumFractionDigits, minimumFractionDigits, and other properties of the DecimalFormat are derived from a pattern. Note that this derivation is different for exponential and non-exponentional formats.

      - The applyPattern specification claims (in rather bizarre grammar) that the maximum number of integer digits is not set by this routine. In reality it is set, although to a rather high value for non-exponential formats.

      - The documentation for scientific notation seems to imply that the maximum number of integer digits can be unspecified. This is nonsense. The implementation seems to distinguish whether the number is zero or non-zero.

      - The documentation is not very clear about the difference between localized and unlocalized patterns.

            jlu Justin Lu
            nlindenbsunw Norbert Lindenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: