Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8357013

HttpURLConnection#getResponseCode can avoid substring call when parsing to int

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • generic
    • generic

      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


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: