j.text.DecimalFormat behavior regarding patterns is not clear

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: None
    • Component/s: core-libs
    • b15
    • generic
    • generic

      j.text.DecimalFormat has the method applyPattern(String), which claims that "There is no limit to integer digits set by this routine, since that is the typical end-user desire; use setMaximumInteger if you want to set a real value."

      This claim is not true; if a scientific notation pattern is used, the maximum integer value will be set. If the pattern is in scientific notation, the limit is derived from the pattern, otherwise, the limit is set to Integer.MAX_VALUE. This behavior also applies to the constructors that take String pattern as input. The spec should be clarified.

            Assignee:
            Justin Lu
            Reporter:
            Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: