<i18n dev> RFR: 6960866: [Fmt-Ch] ChoiceFormat claims impossible and unimplemented functionality

Justin Lu jlu at openjdk.org
Thu Jun 29 18:17:52 UTC 2023


Please review this PR, which clarifies the parameter description of ChoiceFormat.setChoices().

`ChoiceFormat.setChoices(double[] limits, String[] formats)` claims that `formats` can either be "Format objects or Strings". It also claims that "When formatting with object Y, if the object is a NumberFormat, then ((NumberFormat) Y).format(X) is called. Otherwise Y.toString() is called".

This is not true as `formats` is an array of Strings. Thus, the second claim is impossible and unimplemented in the method itself.

The unimplemented specification should be removed from the parameter description.

-------------

Commit messages:
 - Remove impossible claim from param description

Changes: https://git.openjdk.org/jdk/pull/14715/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14715&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-6960866
  Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/14715.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14715/head:pull/14715

PR: https://git.openjdk.org/jdk/pull/14715


More information about the i18n-dev mailing list