On Tue, 20 May 2025 16:03:14 GMT, cagliostro92 <d...@openjdk.org> wrote:

> Trivial PR to enhance Javadoc for the `Properties#list` method, which has 
> cost me some debugging time.

The copyright year for this file should also be updated: `1995, 2025,`

Also, the PR title will need to be changed to,

_8358530: Properties#list should warn against non-String values_

src/java.base/share/classes/java/util/Properties.java line 78:

> 76:  * the call to the {@code propertyNames} or {@code list} method
> 77:  * will fail if it is called on a "compromised" {@code Properties}
> 78:  * object that contains a non-{@code String} key or value.

Since `propertyNames` won't throw `CCE` with a non-String value, instead of 
adding the "or value" wording here, we should move the `list` method to the 
sentence above and remove it from the current sentence.

E.g., on line 73 

> "If the {@code store}, {@code save}, or {@code list) method ...

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

PR Review: https://git.openjdk.org/jdk/pull/25334#pullrequestreview-3021183784
PR Review Comment: https://git.openjdk.org/jdk/pull/25334#discussion_r2207979374

Reply via email to