Re: RFR 8240666: Websocket client’s OpeningHandshake discards the HTTP response body

rahul.r.yadav at oracle.com rahul.r.yadav at oracle.com
Wed May 6 15:48:21 UTC 2020


Thanks Daniel , webrev updated.

- rahul

On 06/05/2020 16:16, Daniel Fuchs wrote:
> Hi Rahul,
>
> LGTM.
>
>  111                 WebSocketHandshakeException wse = 
> (WebSocketHandshakeException) t;
>  112                 out.println("Status code is " + 
> wse.getResponse().statusCode());
>  113                 out.println("Response is " + 
> wse.getResponse().body());
>  114                 assertNotNull(wse.getResponse());
>
>
> I'd suggest moving line 114 two lines up (just after line 111)
> to avoid triggering a NPE if wse.getResponse() returns null.
> No need for a new webrev if that's the only change.
>
> best regards,
>
> -- daniel
>
> On 06/05/2020 16:04, Rahul wrote:
>> Hi Pavel,
>>
>> Thank you for the comment, the webrev has been updated.
>>
>> webrev : 
>> http://cr.openjdk.java.net/~ryadav/webrev_8240666/webrev.00/index.html
>>
>> - rahul
>>
>> On 06/05/2020, 14:26, "Pavel Rappo" <pavel.rappo at oracle.com> wrote:
>>
>>      An assertion of the form
>>               assertEquals(true, 
>> ((String)wse.getResponse().body()).contains("404"));
>>           looks odd. I'd suggest using any of
>>               assertTrue(boolean condition)
>>          assertTrue(boolean condition, String message)
>>           -Pavel
>>           > On 6 May 2020, at 14:12, Rahul <rahul.r.yadav at oracle.com> 
>> wrote:
>>      >
>>      > 
>> http://cr.openjdk.java.net/~ryadav/webrev_8240666/webrev.00/index.html
>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20200506/ff4b8978/attachment.htm>


More information about the net-dev mailing list