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

Brian Burkhalter bpb at openjdk.org
Thu Feb 20 17:24:57 UTC 2025


On Thu, 20 Feb 2025 07:54:28 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8024695: Extend and clean up test
>
> src/java.base/share/classes/java/io/File.java line 254:
> 
>> 252:     static File getCWD() {
>> 253:         return CWD;
>> 254:     }
> 
> This is a bit icky, have you looked at pushing this down to a holder class in UnixFileSystem and WinNTFileSystem so they they aren't dependent on this.

Why not just down into `FileSystem`? It's not OS-dependent.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22821#discussion_r1964046284


More information about the core-libs-dev mailing list