RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled [v5]

Brian Burkhalter bpb at openjdk.org
Tue Jul 15 17:05:46 UTC 2025


On Fri, 11 Jul 2025 15:34:26 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/unix/classes/java/io/UnixFileSystem.java line 120:
>> 
>>> 118:     public String resolve(String parent, String child) {
>>> 119:         if (child.isEmpty()) return parent;
>>> 120:         if (parent.isEmpty()) return child;
>> 
>> The changes to the mkdirs tests suggest this isn't right. Can you look to special casing the empty parent in the listFiles methods as that should fix the issue without the side effect that is being worked around by the newly added mkdirs tests.
>
>> [...] look to special casing the empty parent in the listFiles methods [...].
> 
> Will investigate.

Done as of b055507.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26224#discussion_r2208049996


More information about the core-libs-dev mailing list