On Thu, 5 Nov 2020 17:23:36 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> Patrick Concannon has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8252304: Added read to TestHandler to ensure requestBody consumed before 
>> closing exchange
>
> test/jdk/java/net/httpclient/SendResponseHeadersTest.java line 94:
> 
>> 92:                 try {
>> 93:                     IOException io = expectThrows(IOException.class,
>> 94:                             () -> exchange.sendResponseHeaders(200, 
>> "failMsg".getBytes().length));
> 
> It would be clearer to use a constant value here: either 0, or some 
> meaningless value > 0 and < 16

replaced with 0. See 
https://github.com/openjdk/jdk/pull/1014/commits/8ff6d9b4fcbc0f57f136ff0e7df0d371664badb2

> test/jdk/java/net/httpclient/SendResponseHeadersTest.java line 99:
> 
>> 97:                     // unexpected exception thrown, return error to 
>> client
>> 98:                     t.printStackTrace();
>> 99:                     os.write(("Unexpected error: " + t).getBytes());
> 
> This should be:
>    os.write(("Unexpected error: " + t).getBytes(StandardCharsets.UTF_8));

StandardCharsets.UTF_8 added. See 
https://github.com/openjdk/jdk/pull/1014/commits/8ff6d9b4fcbc0f57f136ff0e7df0d371664badb2

-------------

PR: https://git.openjdk.java.net/jdk/pull/1014

Reply via email to