On Tue, 8 Aug 2023 19:49:19 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Naoto Sato has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains five additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8041488-ListPatterns-PR
>>  - parsePosition update
>>  - Wording fixes
>>  - Added test
>>  - Initial commit
>
> src/java.base/share/classes/java/text/ListFormat.java line 213:
> 
>> 211:     /**
>> 212:      * {@return the list format for the specified patterns}
>> 213:      * <p>
> 
> LDML includes a section on the "Gender of Lists";  If later support was 
> desired, is this API extensible to include that?  
> https://www.unicode.org/reports/tr35/tr35-general.html#List_Gender

IIUC, although it is described within "list patterns" in LDML, it is orthogonal 
to "list patterns." The purpose of the "Gender of Lists" seems to me the 
resulting gender of the whole list of names, e.g., "Tom and Mary" is "other" in 
English, but it is "male" in Arabic (I just used the sample XML in the spec). 
So I believe it is not an extension of the class.

> src/java.base/share/classes/java/text/ListFormat.java line 234:
> 
>> 232:      * If parsing of the pattern string for start/middle/end fails, it 
>> throws an
>> 233:      * {@code IllegalArgumentException}. If two/three pattern string is 
>> empty, or
>> 234:      * fails on parsing, it falls back to
> 
> I don't see code to try to parse the TWO or THREE patterns, where it could 
> detect incorrectly formatted (user supplied) patterns.
> If I understand correctly, a bad TWO or THREE pattern would not be detected 
> until it is used in format or parse.

Right. Will provide validation for them

> src/java.base/share/classes/java/text/ListFormat.java line 442:
> 
>> 440: 
>> 441:     /**
>> 442:      * {@inheritDoc}
> 
> The javadoc from Object.equals doesn't give any information about what 
> constituted equals for a ListFormat.
> Namely, that the locale and patterns are equal.

Will add those ListFormat specific considerations.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1287716917
PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1287716871
PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1287717003

Reply via email to