RFR: 8316000: File.setExecutable silently fails if file does not exist [v3]

Alan Bateman alanb at openjdk.org
Wed Sep 20 08:26:42 UTC 2023


On Tue, 19 Sep 2023 22:48:20 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> On Windows, do not return `true` from the `java.io.File` methods `setReadable(boolean, boolean)` and `setExecutable(boolean, boolean)` if the file does not exist.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8316000: Add the API notes to the corresponding single parameter methods

I agree this one needs a spec clarification as changing the implementation would be an incompatible change leading to the methods apparently failing for cases where they didn't previously fail.  I don't think it will work to just add an apiNote, it needs to normative. Also the descriptions of the return value say that the method fails (which can be interpreted to mean return false) when the file system doesn't support the permission.

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

PR Comment: https://git.openjdk.org/jdk/pull/15673#issuecomment-1727217278


More information about the core-libs-dev mailing list