Please review this PR which improves validation of unmappable characters in strings passed to `ZipFileSystem::getPath` and `ZipPath::resolve`.
Currently, `ZipFileSystem::getPath` and `ZipPath::resolve` throw `IllegalArgumentException` when rejecting a path or entry name which cannot be encoded with the given charset. This PR adds validation to `ZipFileSystem::getBytes` where a failed validation now throws `InvalidPathException`. As far as I can tell, the transitive call sites of `ZipFileSystem::getBytes` ends up being `ZipFileSystem::getPath` and `ZipPath::resolve`. A new test is added in the ZipFS area to verify that the APIs throw exceptions according to specifications when faced with unmappable characters in primary or secondary path string components. This PR is similar to a recently integrated change in the `ZipOutputStream` API via #30319. A CSR has been drafted. ------------- Commit messages: - Add testing for partially unmappable paths in ZipFileSystem::getPath and ZipPath::resolve. - Merge branch 'master' into zipfs-unmappable-path - Throw InvalidPathException from ZipFileSystem::getPath Changes: https://git.openjdk.org/jdk/pull/30584/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30584&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8380450 Stats: 122 lines in 2 files changed: 122 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/30584.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30584/head:pull/30584 PR: https://git.openjdk.org/jdk/pull/30584
