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

Brian Burkhalter bpb at openjdk.org
Fri May 2 18:19:35 UTC 2025


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24977/files
  - new: https://git.openjdk.org/jdk/pull/24977/files/efca3cf4..0fef4782

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24977&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24977&range=01-02

  Stats: 7 lines in 1 file changed: 5 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24977.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24977/head:pull/24977

PR: https://git.openjdk.org/jdk/pull/24977


More information about the core-libs-dev mailing list