RFR: 8024695: new File("").exists() returns false whereas it is the current working directory

Alan Bateman alanb at openjdk.org
Fri Dec 20 17:06:35 UTC 2024


On Thu, 19 Dec 2024 17:17:54 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> It is the same on macOS and presumably other Unix variants where the `access` system call will always fail for `""`. I have not checked older versions.

It's likely the same for other syscalls too, e.g. new File("").list(). Right now I would hesitant to specify how it works now because of the inconsistencies. Instead maybe we should look into the implications of fixing it.

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

PR Comment: https://git.openjdk.org/jdk/pull/22821#issuecomment-2557395207


More information about the core-libs-dev mailing list