On Fri, 18 Aug 2023 03:40:43 GMT, Vyom Tewari <[email protected]> wrote:
>> Please review the code change for >> [JDK-8306040](https://bugs.openjdk.org/browse/JDK-8306040). In the >> overridden "available" method of "HttpResponseInputStream" we are returning >> 1 after exploring all the code path. > > Vyom Tewari has updated the pull request incrementally with one additional > commit since the last revision: > > converted the test to junit and removed the one assert Marked as reviewed by dfuchs (Reviewer). test/jdk/java/net/httpclient/HttpInputStreamAvailableTest.java line 103: > 101: try ( InputStream in = response.body()) { > 102: in.readNBytes(2); > 103: assertEquals(TEST_MESSAGE.length() - 2, in.available()); It could be good to put a comment before this assert to say: Suggestion: // this is not guaranteed, but a failure here would be surprising assertEquals(TEST_MESSAGE.length() - 2, in.available()); ------------- PR Review: https://git.openjdk.org/jdk/pull/14810#pullrequestreview-1586478532 PR Review Comment: https://git.openjdk.org/jdk/pull/14810#discussion_r1299784700
