On Mon, 21 Nov 2022 11:17:27 GMT, Jaikiran Pai <[email protected]> wrote:
>> 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. > > Jaikiran Pai has updated the pull request incrementally with one additional > commit since the last revision: > > review suggestion - do a similar change in URLConnection Looks good now. Thanks for finding the additional occurrence. One final comment: could you please leave the empty catch blocks in one line, i.e. } catch (NumberFormatException e) { } instead of: } catch (NumberFormatException e) { } This format is also recommended in the [Java Style Guidelines](http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html#toc-braces) for empty blocks. ------------- Changes requested by simonis (Reviewer). PR: https://git.openjdk.org/jdk/pull/11258
