Skip to content

Conversation

@thswlsqls
Copy link
Contributor

@thswlsqls thswlsqls commented Dec 25, 2025

Summary

Remove incorrect @throws documentation from FileUtils.deleteFileIfExistsWithRetry.

Description

The method documentation states that no exception is thrown if the file does not exist.
The implementation checks file existence before deletion and does not throw NoSuchFileException in this case.
This change removes the contradictory @throws clause.
No behavior is changed.

Bug ID : JDK-8374342

https://bugs.java.com/bugdatabase/view_bug?bug_id=8374342


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-8374342: Remove incorrect @throws NoSuchFileException from test/lib/jdk/test/lib/util/FileUtils.javaFileUtils.java (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28985

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 25, 2025

👋 Welcome back thswlsqls! 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 25, 2025

@thswlsqls This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8374342: Remove incorrect @throws NoSuchFileException from test/lib/jdk/test/lib/util/FileUtils.javaFileUtils.java

Reviewed-by: michaelm

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 186 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@Michael-Mc-Mahon) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk
Copy link

openjdk bot commented Dec 25, 2025

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

  • core-libs

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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 25, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 25, 2025

Webrevs

Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable. You will need to update the PR title to match the change I made to the bug title.

@thswlsqls thswlsqls changed the title 8374342: Remove incorrect @throws NoSuchFileException from FileUtils.java Remove incorrect @throws NoSuchFileException from test/lib/jdk/test/lib/util/FileUtils.javaFileUtils.java Jan 7, 2026
@openjdk openjdk bot removed the rfr Pull request is ready for review label Jan 7, 2026
@thswlsqls
Copy link
Contributor Author

@Michael-Mc-Mahon Thank you for the review. I updated the PR title to match bug title : JDK-8374342

@Michael-Mc-Mahon
Copy link
Member

You need to prefix the PR title with the bugid as it was before. ie.

8374342: Remove incorrect @throws NoSuchFileException from test/lib/jdk/test/lib/util/FileUtils.javaFileUtils.java

@thswlsqls thswlsqls changed the title Remove incorrect @throws NoSuchFileException from test/lib/jdk/test/lib/util/FileUtils.javaFileUtils.java 8374342: Remove incorrect @throws NoSuchFileException from test/lib/jdk/test/lib/util/FileUtils.javaFileUtils.java Jan 9, 2026
@thswlsqls
Copy link
Contributor Author

thswlsqls commented Jan 9, 2026

@Michael-Mc-Mahon Thank you. I restored the PR title. /integrate

@openjdk
Copy link

openjdk bot commented Jan 9, 2026

⚠️ @thswlsqls the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout JDK-8374342-fix-fileutils-doc
$ git commit --author='Preferred Full Name <[email protected]>' --allow-empty -m 'Update full name'
$ git push

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs [email protected] ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants