RFR: 8353322: Specification of ChoiceFormat#parse(String, ParsePosition) is inadequate [v3]
Alan Bateman
alanb at openjdk.org
Wed Apr 2 10:07:19 UTC 2025
On Tue, 1 Apr 2025 20:32:45 GMT, Justin Lu <jlu at openjdk.org> wrote:
>> Please review this PR which specifies the `ChoiceFormat#parse(String, ParsePosition)` method. A corresponding CSR is filed. The current specification is simply "Parses a Number from the input text" which does not indicate how the value is returned. The criteria for a match, as well as no match should be made clear.
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>
> Address further comments
src/java.base/share/classes/java/text/ChoiceFormat.java line 562:
> 560: /**
> 561: * Parses a {@code Number} from the input text, the subtype of which is always
> 562: * {@code Double}. The value returned is the {@code limit} corresponding
I wonder if we could improve the first sentence, e.g. "Parses the input text from the parse position as a Double" ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24361#discussion_r2024515574
More information about the core-libs-dev
mailing list