On Wed, 3 Jun 2026 23:47:04 GMT, Naoto Sato <[email protected]> wrote:

> Made changes to the invalid placeholder handling in 
> `ListFormat.getInstance(String[])`, stemming from 
> [JDK-8385736](https://bugs.openjdk.org/browse/JDK-8385736).
> 
> This rejects duplicate placeholders and `"{2}"` outside the `three` pattern, 
> with spec and test updates. Also includes minor Javadoc formatting cleanups. 
> The invalid-long-pattern test added with 
> [JDK-8385736](https://bugs.openjdk.org/browse/JDK-8385736) has been 
> repurposed to cover the newly specified invalid-placeholder cases, because 
> the repeated-placeholder input is now rejected immediately by 
> duplicate-placeholder validation.
> 
> Since this changes the behavior of the method, a corresponding CSR has been 
> drafted.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 177a3711
Author:    Naoto Sato <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/177a371109fefe7ba63267aa787cf3167fe9b64e
Stats:     97 lines in 2 files changed: 63 ins; 1 del; 33 mod

8385834: Tighten ListFormat.getInstance(String[]) behavior for invalid 
placeholders

Reviewed-by: jlu

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

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

Reply via email to