RFR: 8355954: File.delete removes read-only files (win) [v3]

Brian Burkhalter bpb at openjdk.org
Fri May 2 20:39:45 UTC 2025


On Fri, 2 May 2025 18:19:35 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> This change proposes to modify `java.io.File.delete()` so that regular files on Windows will not be deleted by default if their read-only attribute is set. A boolean-valued system compatibility property `jdk.io.File.deleteReadOnly` is defined to reinstate legacy behavior if desired.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8355954: Fix HashedPasswordFileTest failure due to obsolete read-only attribute being set

I ran all tests in `open/test/jdk` and `HashedPasswordFileTest` was the only failure which did not appear to be spurious (there were four apparently spurious failures in `java/awt/print`). `HashedPasswordFileTest` was modified in 0fef478 and now passes.

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

PR Comment: https://git.openjdk.org/jdk/pull/24977#issuecomment-2848075890


More information about the core-libs-dev mailing list