RFR: 8374342: Remove incorrect @throws NoSuchFileException from FileUtils.java
Michael McMahon
michaelm at openjdk.org
Tue Jan 6 11:13:14 UTC 2026
On Thu, 25 Dec 2025 01:06:33 GMT, Eunbin Son <duke at openjdk.org> wrote:
> ### 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
This seems reasonable. You will need to update the PR title to match the change I made to the bug title.
-------------
Marked as reviewed by michaelm (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28985#pullrequestreview-3630510921
More information about the core-libs-dev
mailing list