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

Specification of ChoiceFormat#parse(String, ParsePosition) is inadequate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • core-libs
    • b18
    • generic
    • generic

      ChoiceFormat#parse simply states that it returns a Number. Beyond that, it is entirely unspecified as to how the method determines what value to return.

      Additionally, this method provides no indication on what sub type of Number might be returned. This implementation always returns Double, and it would benefit callers to make this apparent, since Number is rarely useful by itself.

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

              Created:
              Updated:
              Resolved: