Change variable name of Http2Headers (#10743)

Motivation:
`addHttp2ToHttpHeaders(int streamId, Http2Headers sourceHeaders, FullHttpMessage destinationMessage, boolean addToTrailer)` 
should match 
`addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders, HttpHeaders outputHeaders, HttpVersion httpVersion, boolean isTrailer, boolean isRequest)`.

However, the `Http2Headers` variable name is different.

Modification:
Changed `sourceHeaders` to `inputHeaders`.

Result:
Variable and JavaDoc naming now correct.
This commit is contained in:
Aayush Atharva 2020-10-29 15:10:49 +05:30 committed by GitHub
parent 8a10adaa55
commit e9b28e76a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,15 +331,15 @@ public final class HttpConversionUtil {
* Translate and add HTTP/2 headers to HTTP/1.x headers.
*
* @param streamId The stream associated with {@code sourceHeaders}.
* @param sourceHeaders The HTTP/2 headers to convert.
* @param inputHeaders The HTTP/2 headers to convert.
* @param destinationMessage The object which will contain the resulting HTTP/1.x headers.
* @param addToTrailer {@code true} to add to trailing headers. {@code false} to add to initial headers.
* @throws Http2Exception If not all HTTP/2 headers can be translated to HTTP/1.x.
* @see #addHttp2ToHttpHeaders(int, Http2Headers, HttpHeaders, HttpVersion, boolean, boolean)
*/
public static void addHttp2ToHttpHeaders(int streamId, Http2Headers sourceHeaders,
public static void addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders,
FullHttpMessage destinationMessage, boolean addToTrailer) throws Http2Exception {
addHttp2ToHttpHeaders(streamId, sourceHeaders,
addHttp2ToHttpHeaders(streamId, inputHeaders,
addToTrailer ? destinationMessage.trailingHeaders() : destinationMessage.headers(),
destinationMessage.protocolVersion(), addToTrailer, destinationMessage instanceof HttpRequest);
}