On Sat, 29 Mar 2025 17:27:20 GMT, Patrick Strawderman <[email protected]> wrote:
> Use `HexFormat.fromHexDigits` in URLDecoder, instead of `Integer.parseInt`.
src/java.base/share/classes/java/net/URLDecoder.java line 208:
> 206: while ( ((i+2) < numChars) &&
> 207: (c=='%')) {
> 208: int v = HexFormat.fromHexDigits(s, i + 1, i + 3);
Its worth noting that the exceptions thrown by HexFormat.fromHexDigits are
different than those thrown by Integer.parseInt, as to the specific type and
exception message.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24314#discussion_r2023532637