On Tue, 4 Feb 2025 11:07:09 GMT, Volkan Yazici <vyaz...@openjdk.org> wrote:
>> Adds `HttpRequest.Builder::copy` tests to `HttpRequestBuilderTest`. > > Volkan Yazici has updated the pull request incrementally with one additional > commit since the last revision: > > Replace `assert`s with explicit checks throwing `AssertionError`s test/jdk/java/net/httpclient/HttpRequestBuilderTest.java line 270: > 268: HttpRequest defaultHeadReq = new > NotOverriddenHEADImpl().HEAD().uri(TEST_URI).build(); > 269: assertEquals("HEAD", defaultHeadReq.method(), "Method"); > 270: assertEquals(defaultHeadReq.bodyPublisher().isEmpty(), false, > "Body publisher absence"); The params here appear inverted. The first param to the method says "expected", so I think it should be: assertEquals(false, defaultHeadReq.bodyPublisher().isEmpty(), "Body publisher absence"); test/jdk/java/net/httpclient/HttpRequestBuilderTest.java line 300: > 298: + ". Unexpected body processor for GET: " > 299: + request.bodyPublisher().get()); > 300: assertEquals(method, expectedMethod, "Method"); Same here - This should be: assertEquals(expectedMethod, method, "Method"); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23415#discussion_r1940988132 PR Review Comment: https://git.openjdk.org/jdk/pull/23415#discussion_r1940988900