RFR: 8303965: java.net.http.HttpClient should reset the stream if response headers contain malformed header fields [v2]

Jaikiran Pai jpai at openjdk.org
Mon Mar 13 11:10:39 UTC 2023


On Mon, 13 Mar 2023 10:58:53 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java line 1220:
>> 
>>> 1218:      */
>>> 1219:     @SuppressWarnings("unchecked")
>>> 1220:     <T> Stream<T> getInitialStream() {
>> 
>> Given that this method returns and also updates the initial stream member field, the naming of this method is a bit odd. But I can't think of a better name, plus this is internal to the `jdk.internal.net.http` package and also has a comment which explains what it does, so I think this name is fine.
>
> Maybe I could change the name to "retrieveInitialStream()"... Would that be better?

Hello Daniel, I don't have strong preference, `retrieveInitialStream` sounds OK. It's also OK if you would want to continue with the current name.

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

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


More information about the net-dev mailing list