RFR: 8326487: ZipFileSystem.getPath("").getFileName() returns null instead of an empty Path
Jaikiran Pai
jpai at openjdk.org
Tue Feb 17 15:35:40 UTC 2026
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.
-------------
Commit messages:
- include a test for root path
- 8326487: ZipFileSystem.getPath().getFileName() returns null instead of an empty string
Changes: https://git.openjdk.org/jdk/pull/29760/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29760&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8326487
Stats: 46 lines in 2 files changed: 40 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/29760.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29760/head:pull/29760
PR: https://git.openjdk.org/jdk/pull/29760
More information about the core-libs-dev
mailing list