On Tue, 10 Mar 2026 16:28:18 GMT, Dmitry Markov <[email protected]> wrote:

>> Documented the IllegalArgumentException thrown when the initial directory 
>> was invalid, and improved the exception description to be more precise and 
>> informative.
>
> Dmitry Markov has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Update exception message

modules/javafx.graphics/src/main/java/javafx/stage/FileChooser.java line 328:

> 326:      * @param ownerWindow the owner window of the displayed file dialog
> 327:      * @throws IllegalArgumentException if the initial directory does not
> 328:      *      exist or is not a directory or is not accessible

I wonder if this is the right approach.  Yes, it currently works like that, but 
I think it's wrong!
What if the directory was deleted?  What if it was on a network share?

The right behavior should be to open the dialog using the current directory 
(ignoring the error), and let the user deal with it.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2101#discussion_r2913306725

Reply via email to