RFR: 8258246: sun.net.www.ParseUtil.decode throws java.lang.IllegalArgumentException: Error decoding percent encoded characters [v2]

Alan Bateman alanb at openjdk.org
Sun Feb 2 08:47:00 UTC 2025


On Fri, 31 Jan 2025 12:53:32 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.
>
> Fabian Meumertzheim has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix bug reference

The reason this issue has been open in JBS for sometime is because it's a not a small project that is fraught with danger. It's bigger and broader than the bug report suggests. Doing anything will require going over decisions make in JDK 1.2, and later in JDK 7 and working through all the compatibility issues that any changes in this area will have.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23383#issuecomment-2629301464


More information about the core-libs-dev mailing list