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

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

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

@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

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

Development

Successfully merging this pull request may close these issues.

2 participants