Integrated: 8373097: Save command should create missing parent directories

Christian Stein cstein at openjdk.org
Wed Dec 17 07:21:04 UTC 2025


On Thu, 4 Dec 2025 18:08:56 GMT, Christian Stein <cstein at openjdk.org> wrote:

> Please review this change enhancing the `/save <file>` command in JShell to create missing parent directories.
> 
> Prior to this change, when the <file> argument of a `/save` command starts with a list of directory names, of which at least one does not exist, the command fails with an exception reading:
> 
> | File 'some/path/Snippet.java' for '/save' threw exception: java.nio.file.NoSuchFileException: some\path\Snippet.java
> 
> 
> Any exception happening during the creation of missing parent directories (using `Files.createDirectories` API) is caught and transformed into file-related error message.

This pull request has now been integrated.

Changeset: e9b4696a
Author:    Christian Stein <cstein at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e9b4696acc966d96d42880e840c8fe27434e4e1b
Stats:     17 lines in 2 files changed: 15 ins; 0 del; 2 mod

8373097: Save command should create missing parent directories

Reviewed-by: jlahoda

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

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


More information about the compiler-dev mailing list