On Tue, 29 Aug 2023 16:51:49 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> Introducing a new formatting class for locale-dependent list patterns. The >> class is to provide the functionality from the Unicode Consortium's LDML >> specification for [list >> patterns](https://www.unicode.org/reports/tr35/tr35-general.html#ListPatterns). >> For example, given a list of String as "Monday", "Wednesday", "Friday", its >> `format` method would produce "Monday, Wednesday, and Friday" in US English. >> A CSR has also been drafted, and its draft javadoc can be viewed here: >> https://cr.openjdk.org/~naoto/JDK-8041488-ListPatterns-PR/api.00/java.base/java/text/ListFormat.html > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Removing unnecessary commas src/java.base/share/classes/java/text/ListFormat.java line 59: > 57: * } > 58: * This will produce the concatenated list string, "Foo, Bar, and Baz" as > seen in > 59: * the following table: Suggestion: * the following: src/java.base/share/classes/java/text/ListFormat.java line 84: > 82: * </table> > 83: * Note that the above chart represents the examples in the CLDR > definition, > 84: * and there could be different patterns from other locale providers. Suggestion: * Note: these examples are from CLDR, there could be different patterns from other locale providers. src/java.base/share/classes/java/text/ListFormat.java line 90: > 88: * method specifies the delimiting patterns for the start/middle/end > portion of > 89: * the formatted string, as well as optional specialized patterns for two > or three > 90: * elements. Refer to the method description for more detail. Suggestion: * Alternatively, more flexible patterns can be constructed from the pattern parts for the start, middle, * and end of the formatted list as well as specialized patterns for lists of two or three elements. * Refer to the {@link #getInstance(String[])} method description for more detail. src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java line 840: > 838: * > 839: * @param type type. one of {@link ListFormat.Type} > 840: * @param style Style. one of {@link ListFormat.Style} Suggestion: * @param type a {@link ListFormat.Type} * @param style a {@link ListFormat.Style} ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1316403770 PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1316405139 PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1316412400 PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1316400394