Integrated: 8357013: HttpURLConnection#getResponseCode can avoid substring call when parsing to int

Patrick Strawderman duke at openjdk.org
Tue May 20 17:23:55 UTC 2025


On Thu, 15 May 2025 05:14:02 GMT, Patrick Strawderman <duke at openjdk.org> wrote:

> Avoid allocating a substring to parse the response code in HttpURLConnection#getResponseCode, but instead use the Integer.parseInt overload that accepts String indices.

This pull request has now been integrated.

Changeset: e9d1d87b
Author:    Patrick Strawderman <pstrawderman at netflix.com>
Committer: Daniel Fuchs <dfuchs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e9d1d87b34f636747065c01128a12fc057070e09
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8357013: HttpURLConnection#getResponseCode can avoid substring call when parsing to int

Reviewed-by: dfuchs

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

PR: https://git.openjdk.org/jdk/pull/25245


More information about the net-dev mailing list