On Fri, 8 Sep 2023 14:43:59 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 24 additional >> commits since the last revision: >> >> - Reflects review comments >> - Merge branch 'master' into JDK-8041488-ListPatterns-PR >> - Incorporating suggested changes >> - Update src/java.base/share/classes/java/text/ListFormat.java >> >> Co-authored-by: Roger Riggs <roger.ri...@oracle.com> >> - Update src/java.base/share/classes/java/text/ListFormat.java >> >> Co-authored-by: Roger Riggs <roger.ri...@oracle.com> >> - Update >> src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java >> >> Co-authored-by: Roger Riggs <roger.ri...@oracle.com> >> - Removing unnecessary commas >> - Added tests >> - Review comments >> - Merge branch 'master' into JDK-8041488-ListPatterns-PR >> - ... and 14 more: https://git.openjdk.org/jdk/compare/fa1dfefb...bce82a4f > > src/java.base/share/classes/java/text/ListFormat.java line 536: > >> 534: try { >> 535: init(); >> 536: } catch (IllegalArgumentException iae) { > > If the `patterns` array contains a null, perhaps due to corrupted stream > contents, `init()` will throw NPE. > I don't recommend catching NPE here, but perhaps `init()` should check for > nulls and throw IAE. Actually, null checks for the `patterns` array elements should be done also for the 1-arg factory method. Will add the check in `init()` and the corresponding test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15130#discussion_r1320169657