RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v7]
Alan Bateman
alanb at openjdk.org
Tue Jul 15 16:46:40 UTC 2025
On Tue, 15 Jul 2025 15:27:06 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> test/jdk/java/io/File/EmptyPath.java line 283:
>>
>>> 281: assertTrue(child.mkdirs());
>>> 282: assertTrue(child.delete());
>>> 283: }
>>
>> The updated proposal is local to listFiles and doesn't change UnixFileSystem.resolve. Is the test update in sync with the latest change?
>
> Yes. The OS-dependent `mkdirs` sub-tests reflect the actual behavior.
Okay, but if I read this correctly then these methods will test mkdirs with a non-empty path as child will be "/child" or "\child". In order to test mkdirs with an empty path then I think we need `assertFalse(f.mkdirs());`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26224#discussion_r2208011372
More information about the core-libs-dev
mailing list