On Mon, 20 Jan 2025 08:31:18 GMT, Volkan Yazıcı <d...@openjdk.org> wrote:
>> Adds `limiting()` factory methods to >> `HttpResponse.Body{Handlers,Subscribers}` to handle excessive server input >> in `HttpClient`. I would appreciate your input whether `discardExcess` >> should be kept or dropped. I plan to file a CSR once there is an agreement >> on the PR. > > Volkan Yazıcı has updated the pull request incrementally with one additional > commit since the last revision: > > Fix `HttpResponse` copyright year test/jdk/java/net/httpclient/HttpResponseLimitingTest.java line 84: > 82: > 83: static Arguments[] sufficientCapacities() { > 84: return capacityArgs(Long.MAX_VALUE, RESPONSE_BODY.length); If I'm reading this (and the `insufficientCapacities()`) correctly, then it appears that we are testing the "edge" capacities. I think including at least one more arbitrary capacity value which isn't an "edge" might be good too. Something like: final long randomCapacity = new Random(RESPONSE_BODY.length + 1, Long.MAX_VALUE); Similar idea for `insufficientCapacities()`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23096#discussion_r1923517043