Can I please get a review for this small change which addresses https://bugs.openjdk.org/browse/JDK-8297211? The change checks if the `content-length` header value is present before parsing it into a `Long` value. The commit also now catches the more specific `NumberFormatException` instead of a general `Exception`. Given the context of the code, I believe this change in the exception type in the catch block should be fine.
No new test has been introduced given the nature of this change. I have triggered existing tests to verify no unexpected regressions show up. ------------- Commit messages: - 8297211: Expensive fillInStackTrace operation in HttpURLConnection.getOutputStream0 when no content-lenght in response Changes: https://git.openjdk.org/jdk/pull/11258/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11258&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8297211 Stats: 8 lines in 1 file changed: 5 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/11258.diff Fetch: git fetch https://git.openjdk.org/jdk pull/11258/head:pull/11258 PR: https://git.openjdk.org/jdk/pull/11258
