RFR: 8253005: Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders` [v9]
Daniel Fuchs
dfuchs at openjdk.java.net
Fri Nov 6 12:53:02 UTC 2020
On Fri, 6 Nov 2020 11:50:10 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:
>> Hi,
>>
>> Could someone please review my fix for JDK-8253005: 'Add `@throws IOException` in javadoc for `HttpEchange.sendResponseHeaders`' ?
>>
>> The method `HttpEchange.sendResponseHeaders` throws an `IOException` but is unspecified in its javadoc. This fix adds an `@throws IOException` to its specification and a description of the conditions under which the exception is thrown.
>>
>> Kind regards,
>> Patrick
>
> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
>
> 8253005: Restructured test to use @BeforeTest/@AfterTest
Changes requested by dfuchs (Reviewer).
test/jdk/java/net/httpclient/SendResponseHeadersTest.java line 76:
> 74: loopback.getHostName(),
> 75: server.getAddress().getPort(),
> 76: path, null, null);
Can we use the URIBuilder here?
test/jdk/java/net/httpclient/SendResponseHeadersTest.java line 81:
> 79: @Test
> 80: public void testSend() throws Exception {
> 81: HttpClient client = HttpClient.newHttpClient();
It would be better to set up a NO_PROXY proxy selector.
test/jdk/java/net/httpclient/SendResponseHeadersTest.java line 93:
> 91: @AfterTest
> 92: public void tearDown() {
> 93: server.stop(2);
we usually call `server.stop(0)` in tests.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1014
More information about the net-dev
mailing list