On Thu, 16 Apr 2026 22:14:09 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.
> 
> I'll create the CSR once I've got some review feed back.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

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

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

I cannot fully understand the part, “…to edit in the name some other file to 
load/open…”. I guess you mean that the user may be allowed to type the name of 
the file and that file may not exist.

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

> 454:      * value or to edit in the name some other file to load/open even if 
> it is not present.
> 455:      * Applications should therefore verify the file represented by the 
> {@code String} exists.
> 456:      * The value is usually the basename, not a full path name.

Shouldn't the text stick to 80-column limit?

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

> 512:      * The visible manifestation of this selection, if any, depends on 
> factors
> 513:      * such as the file existence, the dialog mode, and the native 
> platform.
> 514:      * E.g., the file could be highlighted in the file list, or a

Shall we replace “e.g.” with “for example” as recommended in [the Style 
Guide](https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#styleguide)
 of "How to Write Doc Comments for the Javadoc Tool"?

> **Avoid Latin**: …use "for example" instead of "e.g."…

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

> 517:      * This method accepts either a full file path, or a file name with 
> an
> 518:      * extension if used together with the {@code setDirectory} method.
> 519:      * It is platform specific how a full file path interacts with 
> {@code setDirectory}.

Suggestion:

     * It is platform-specific how a full file path interacts with {@code 
setDirectory}.

Should it be spelt with a hyphen as a compound adjective?

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

> 519:      * It is platform specific how a full file path interacts with 
> {@code setDirectory}.
> 520:      * It may be that the directory is always used instead of the file 
> path, or
> 521:      * the file path over-rides the directory, or even that the full 
> file path

Suggestion:

     * the file path overrides the directory, or even that the full file path

I've never come across “override” spelt with a hyphen; it's non-standard, I 
can't find such spelling in a dictionary.

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

> 520:      * It may be that the directory is always used instead of the file 
> path, or
> 521:      * the file path over-rides the directory, or even that the full 
> file path
> 522:      * is interpreted as a base file name. Therefore it is strongly 
> recommended to

Suggestion:

     * is interpreted as a base file name. Therefore, it is strongly 
recommended to

A comma?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3101033287
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3101000452
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3101067555
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3101083387
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3101104091
PR Review Comment: https://git.openjdk.org/jdk/pull/30777#discussion_r3101114409

Reply via email to