RFR: 8258246: sun.net.www.ParseUtil.decode throws java.lang.IllegalArgumentException: Error decoding percent encoded characters
Fabian Meumertzheim
fmeum at openjdk.org
Fri Jan 31 12:17:34 UTC 2025
`URLClassPath` called into `ParseUtil.fileToEncodedURL`, which misencoded characters with a four byte UTF-8 representation. Replacing that function with `toPath().toUri().toURL()` (and removing it, since its only used once) results in correct encoding for all Unicode characters.
-------------
Commit messages:
- 8258246: sun.net.www.ParseUtil.decode
- Add and update tests
Changes: https://git.openjdk.org/jdk/pull/23383/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23383&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8258246
Stats: 222 lines in 4 files changed: 197 ins; 18 del; 7 mod
Patch: https://git.openjdk.org/jdk/pull/23383.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23383/head:pull/23383
PR: https://git.openjdk.org/jdk/pull/23383
More information about the net-dev
mailing list