RFR: 8353453: URLDecoder should use HexFormat
Jaikiran Pai
jpai at openjdk.org
Mon Apr 7 07:22:50 UTC 2025
On Sat, 29 Mar 2025 17:27:20 GMT, Patrick Strawderman <duke at openjdk.org> wrote:
> Use `HexFormat.fromHexDigits` in URLDecoder, instead of `Integer.parseInt`.
I would have preferred for the catch block to be changed to catch `IllegalArgumentException` instead of the current `NumberFormatException`, to closely align with the specification of `HexFormat.fromHexDigits(CharSequence string, int fromIndex, int toIndex)`, but I see that it has been discussed and the current version approved.
Looks OK to me.
-------------
Marked as reviewed by jpai (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24314#pullrequestreview-2745751948
More information about the net-dev
mailing list