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

2025-05-19 Thread Alan Bateman
On Mon, 19 May 2025 17:10:50 GMT, Brian Burkhalter 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.deleteRe

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

2025-05-19 Thread Brian Burkhalter
On Mon, 19 May 2025 15:57:14 GMT, Alan Bateman wrote: > I think that would be simpler and means the `@EnabledOnOs` usages would go > away, but it's up to you. I agree that is better. So changed in [74e1698](https://github.com/openjdk/jdk/pull/24977/commits/74e16983c94d9b29c91b660e8a025388d72ae

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

2025-05-19 Thread Brian Burkhalter
> 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.

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

2025-05-19 Thread Alan Bateman
On Mon, 19 May 2025 15:20:25 GMT, Brian Burkhalter wrote: >> Split the test method in half for Unix and Windows in >> [fa2273e](https://github.com/openjdk/jdk/pull/24977/commits/fa2273eded040a22c1e32ba8870571d3a7daf427). > >> The behavior and system property is Windows specific and might make th

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

2025-05-19 Thread Brian Burkhalter
On Fri, 16 May 2025 17:22:14 GMT, Brian Burkhalter wrote: >> I guess collapsing the tests made them more ambiguous. Will fix. > > Split the test method in half for Unix and Windows in > [fa2273e](https://github.com/openjdk/jdk/pull/24977/commits/fa2273eded040a22c1e32ba8870571d3a7daf427). > The

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

2025-05-16 Thread Brian Burkhalter
> 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.

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

2025-05-16 Thread Brian Burkhalter
On Fri, 16 May 2025 06:28:14 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/DeleteReadOnly.java line 47: >> >>> 45: >>> 46: private static final File DIR = new File(".", "dir"); >>> 47: private static final File FILE = new File(DIR, "file"); >> >> If one of the tests fails then

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

2025-05-16 Thread Brian Burkhalter
> 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.

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

2025-05-15 Thread Brian Burkhalter
On Fri, 16 May 2025 06:17:32 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >> com

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

2025-05-15 Thread Alan Bateman
On Thu, 15 May 2025 22:42:15 GMT, Brian Burkhalter 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.deleteRe

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

2025-05-15 Thread Brian Burkhalter
> 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.

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

2025-05-15 Thread Brian Burkhalter
On Thu, 15 May 2025 11:11:06 GMT, Johannes Döbler wrote: > [I]t could be useful to let JUnit create and inject a temporary root > directory [...] I am not sure about this. The temporary file path created by JUnit, on macOS at least, is in a different directory hierarchy (`/var/...`) from the j

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

2025-05-15 Thread Johannes Döbler
On Thu, 15 May 2025 09:40:13 GMT, Alan Bateman wrote: >> 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 > > test/jdk/java/io/

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

2025-05-15 Thread Alan Bateman
On Fri, 2 May 2025 18:19:35 GMT, Brian Burkhalter 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.deleteRea

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

2025-05-07 Thread Brian Burkhalter
On Wed, 7 May 2025 06:06:08 GMT, Alan Bateman wrote: > I assume the CSR will be expanded, e.g. to list deleteOnExit Done. - PR Comment: https://git.openjdk.org/jdk/pull/24977#issuecomment-2859058406

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

2025-05-06 Thread Alan Bateman
On Wed, 7 May 2025 06:16:53 GMT, Bernd wrote: > Maybe the Release Notes should mention that this does not care for Unix > readonly (I.e. files without Read permissions). The release note will be clear that this is a Windows only change. - PR Comment: https://git.openjdk.org/jdk/pu

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

2025-05-06 Thread Bernd
On Fri, 2 May 2025 18:19:35 GMT, Brian Burkhalter 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.deleteRea

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

2025-05-06 Thread Alan Bateman
On Fri, 2 May 2025 18:19:35 GMT, Brian Burkhalter 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.deleteRea

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

2025-05-02 Thread Brian Burkhalter
On Fri, 2 May 2025 18:19:35 GMT, Brian Burkhalter 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.deleteRea

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

2025-05-02 Thread Brian Burkhalter
> 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.

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

2025-05-01 Thread Brian Burkhalter
On Thu, 1 May 2025 12:40:02 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8355954: Address comments on naming in the PR > > src/java.base/windows/classes/java/io/WinNTFileSystem.java line 45

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

2025-05-01 Thread Brian Burkhalter
> 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.

Re: RFR: 8355954: File.delete removes read-only files (win)

2025-05-01 Thread Brian Burkhalter
On Thu, 1 May 2025 16:16:22 GMT, Alan Bateman wrote: > [...] we will need to find everything that might be accidentally depending on > the behavior. So far I found only `SetAccess` but there is more testing to do, as well as code scanning. - PR Comment: https://git.openjdk.org/jd

Re: RFR: 8355954: File.delete removes read-only files (win)

2025-05-01 Thread Alan Bateman
On Thu, 1 May 2025 15:54:39 GMT, Brian Burkhalter wrote: > > Will the new property will also change behavior of > > java.io.File.deleteOnExit() > > Yes, as that calls `File.delete`. Jason's message is a reminder that we will need to find everything that might be accidentally depending on the

Re: RFR: 8355954: File.delete removes read-only files (win)

2025-05-01 Thread Brian Burkhalter
On Thu, 1 May 2025 15:03:02 GMT, Jason Mehrens wrote: > Will the new property will also change behavior of java.io.File.deleteOnExit() Yes, as that calls `File.delete`. > and java.nio.file.StandardOpenOption.DELETE_ON_CLOSE? No. - PR Comment: https://git.openjdk.org/jdk/pull/2497

Re: RFR: 8355954: File.delete removes read-only files (win)

2025-05-01 Thread Jason Mehrens
On Wed, 30 Apr 2025 23:38:02 GMT, Brian Burkhalter 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.deleteReadOn

Re: RFR: 8355954: File.delete removes read-only files (win)

2025-05-01 Thread Brian Burkhalter
On Thu, 1 May 2025 12:40:41 GMT, Alan Bateman wrote: > It will need a release note too. The issue is already so labelled. - PR Comment: https://git.openjdk.org/jdk/pull/24977#issuecomment-2845119678

Re: RFR: 8355954: File.delete removes read-only files (win)

2025-05-01 Thread Alan Bateman
On Wed, 30 Apr 2025 23:38:02 GMT, Brian Burkhalter 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.deleteReadOn

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

2025-04-30 Thread Brian Burkhalter
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. ---