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.
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.
- csr for
-
JDK-8353327 Specification of ChoiceFormat#parse(String, ParsePosition) is inadequate
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/a8dfcf55
-
Review(master) openjdk/jdk/24361