RFR: 8326487: ZipFileSystem.getPath("").getFileName() returns null instead of an empty Path
Alan Bateman
alanb at openjdk.org
Tue Feb 17 16:40:39 UTC 2026
On Tue, 17 Feb 2026 15:27:51 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Can I please get a review of this change which proposes to fix the issue reported in https://bugs.openjdk.org/browse/JDK-8326487?
>
> `java.nio.file.Path.getFileName()` is specified to return a non-null value for an empty path. However, the current implementation of zipfs returns null for an empty path. The commit in this PR addresses that issue in zipfs and introduces a test which reproduces the issue and verifies the fix.
I think this looks okay. At some point we should replace zipfs/Basic.java with a JUnit test as it has growth very large over time.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29760#pullrequestreview-3815035237
More information about the core-libs-dev
mailing list