RFR: 8170305: URLConnection doesn't handle HTTP/1.1 1xx (informational) messages [v4]

Jaikiran Pai jpai at openjdk.org
Mon Sep 12 13:26:46 UTC 2022


On Mon, 12 Sep 2022 13:04:12 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> I initially thought about that, but since the API javadoc doesn't specifically talk about this sub-type of `IOException`, I decided it's perhaps better not to start expecting it. However, if it's OK for the test to rely on this (internal) knowledge then I'll go ahead and change it.
>
> Yes - this is not a conformance test, and ProtocolException is within the bounds. It's OK for a non-regression test to expect the specific subtype that the code change is throwing. My concern here is that the test could be passing if some other kind of errors occurred - like e.g. connect exception. Then we wouldn't be testing what we think we're testing.

Thank you. I've now updated the test to expect `ProtocolException`. The test continues to pass with this change.

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

PR: https://git.openjdk.org/jdk/pull/10229


More information about the net-dev mailing list