A DESCRIPTION OF THE PROBLEM :
HttpURLConnection#getResponseCode creates a substring of the status line in order to parse the integer response code, however there now exists an Integer.parseInt variant that accepts a full String with start / end indices that can be used to avoid allocating the substring.
See: https://github.com/openjdk/jdk/commit/b2d42d35a1d113649adb696646218d8b63bce9c5
HttpURLConnection#getResponseCode creates a substring of the status line in order to parse the integer response code, however there now exists an Integer.parseInt variant that accepts a full String with start / end indices that can be used to avoid allocating the substring.
See: https://github.com/openjdk/jdk/commit/b2d42d35a1d113649adb696646218d8b63bce9c5
- links to
-
Review(master) openjdk/jdk/25245