On Thu, 7 Nov 2024 12:46:41 GMT, Daniel Jeliński <[email protected]> wrote:
>> test/jdk/java/net/HttpURLConnection/HttpURLConnectionExpect100Test.java line
>> 222:
>>
>>> 220: }
>>> 221: // wait until the client closes the socket
>>> 222: while (line != null) {
>>
>> Hello Daniel, does the code ever enter this `while` loop? If I'm reading the
>> above few lines correctly, then when the code exits the previous `do while`
>> loop then `line` would be `null` and `line` appears to continue being `null`
>> when it reaches here.
>
> Hi Jaikiran, the previous while loop is usually exited with a zero-length
> line. Null is only returned on EOF.
Thank you that explains it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21948#discussion_r1832627286