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
On Fri, 31 Jan 2025 09:47:35 GMT, Fabian Meumertzheim <fmeum at openjdk.org> wrote:
> `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.
@jaikiran This is my attempt at making progress on https://mail.openjdk.org/pipermail/core-libs-dev/2024-November/135869.html without touching general URL/URI encoding code. I hope that this can fix the issue while avoiding backwards compatibility concerns.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23383#issuecomment-2627066685
More information about the net-dev
mailing list