Skip to content

Conversation

@sormuras
Copy link
Member

@sormuras sormuras commented Dec 4, 2025

Please review this change enhancing the /save <file> command in JShell to create missing parent directories.

Prior to this change, when the 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:

/save some/path/Snippet.java
| 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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8373097: Save command should create missing parent directories (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28662/head:pull/28662
$ git checkout pull/28662

Update a local copy of the PR:
$ git checkout pull/28662
$ git pull https://git.openjdk.org/jdk.git pull/28662/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28662

View PR using the GUI difftool:
$ git pr show -t 28662

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28662.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 4, 2025

👋 Welcome back cstein! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 4, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the compiler compiler-dev@openjdk.org label Dec 4, 2025
@openjdk
Copy link

openjdk bot commented Dec 4, 2025

@sormuras The following label will be automatically applied to this pull request:

  • compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@sormuras sormuras marked this pull request as ready for review December 8, 2025 07:11
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 8, 2025
@openjdk
Copy link

openjdk bot commented Dec 8, 2025

@sormuras Unknown command save - for a list of valid commands use /help.

@mlbridge
Copy link

mlbridge bot commented Dec 8, 2025

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler compiler-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant