On Fri, 17 Apr 2026 20:12:47 GMT, Phil Race <[email protected]> wrote:

>> It has been noted that the java.awt.FileDialog specification could be 
>> clearer that the UI showing a file as selected to load/open is not just 
>> variable in how it is done, the platform might not do it at all, and since 
>> FileDialog is (usually) a completely native component, we can only reinforce 
>> the platform is what decides if this is possible.
>> 
>> The CSR is ready for review.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Phil Race has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - 8381843
>  - 8381843

Changes requested by aivanov (Reviewer).

src/java.desktop/share/classes/java/awt/FileDialog.java line 455:

> 453:      * non-existent file. For example, it may be possible for the user to
> 454:      * "accept" the result of a {@code setFile} value or to edit in the 
> name
> 455:      * of some other file to load/open even if it is not present.

Will “…or to type a name…” be clearer?

“…for _the_ `{@code LOAD}` mode…” — is the definite article missing?

To me, the part after “to edit in” is still hard to understand.

src/java.desktop/share/classes/java/awt/FileDialog.java line 457:

> 455:      * of some other file to load/open even if it is not present.
> 456:      * Applications should therefore verify the file represented by the
> 457:      * {@code String} exists.

“represented by the `{@code String}`” refers to the returned value. Should it 
be spelt out explicitly?

src/java.desktop/share/classes/java/awt/FileDialog.java line 458:

> 456:      * Applications should therefore verify the file represented by the
> 457:      * {@code String} exists.
> 458:      * The value is usually the basename, not a full path name.

Suggestion:

     * <p>
     * The value is usually the basename, not a full path name.

Start a new paragraph?

src/java.desktop/share/classes/java/awt/FileDialog.java line 527:

> 525:      * use {@code setDirectory} to set the folder and {@code setFile} to
> 526:      * set a base file name.
> 527:      * <p>

Start a new paragraph at “therefore”? It's an important detail, and it will 
stand out if the recommendation is in its own paragraph.

“…to set ~~a~~ _the_ base file name.” — the definite article? It will align 
with “…to set _the_ folder…”.

src/java.desktop/share/classes/java/awt/FileDialog.java line 552:

> 550:      * Enables or disables multiple file selection for the file dialog.
> 551:      * <p>
> 552:      * Multiple mode may be ignored in some cases, for example commonly

Suggestion:

     * Multiple mode may be ignored in some cases, for example, commonly

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

PR Review: https://git.openjdk.org/jdk/pull/30777#pullrequestreview-4228437858
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3188780893
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3188790877
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3188794202
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3188837141
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3188874645

Reply via email to