-
Enhancement
-
Resolution: Fixed
-
P4
-
11, 17, 20
-
b25
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8298309 | 17.0.7 | Dukebot | P4 | Resolved | Fixed | b01 |
The following code in sun.net.www.protocol.http.HttpURLConnection.getOutputStream0 (https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java#L1937):
try {
cl = Long.parseLong(responses.findValue("content-length"));
} catch (Exception exc) { };
causes an expensive fillInStackTrace operation when "content-length" is missing in responses.
We should check whether it is present before trying to parse it.
try {
cl = Long.parseLong(responses.findValue("content-length"));
} catch (Exception exc) { };
causes an expensive fillInStackTrace operation when "content-length" is missing in responses.
We should check whether it is present before trying to parse it.
- backported by
-
JDK-8298309 Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-length in response
- Resolved
- duplicates
-
JDK-8217293 Avoid unnecessary memory allocation in HttpURLConnection
- Closed
- links to
-
Commit openjdk/jdk17u-dev/a2fb9ae9
-
Commit openjdk/jdk/392ac705
-
Review openjdk/jdk17u-dev/918
-
Review openjdk/jdk/11258
(1 links to)