Skip to content

Commit

Permalink
Remove unused parameter from method declaration.
Browse files Browse the repository at this point in the history
Motivation:

We had an unused paramter on a method, we should just remove it to keep code clean.

Modifications:

- Remove parameter
- Fix typo in javadoc

Result:

Cleanup done.
  • Loading branch information
normanmaurer committed Oct 7, 2015
1 parent dbfb745 commit 1f0154e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public static void addHttp2ToHttpHeaders(int streamId, Http2Headers sourceHeader
* @param httpVersion What HTTP/1.x version {@code outputHeaders} should be treated as when doing the conversion.
* @param isTrailer {@code true} if {@code outputHeaders} should be treated as trailing headers.
* {@code false} otherwise.
* @param isReqeust {@code true} if the {@code outputHeaders} will be used in a request message.
* @param isRequest {@code true} if the {@code outputHeaders} will be used in a request message.
* {@code false} for response message.
* @throws Http2Exception If not all HTTP/2 headers can be translated to HTTP/1.x.
*/
Expand Down Expand Up @@ -302,8 +302,7 @@ public static Http2Headers toHttp2Headers(HttpMessage in, boolean validateHeader
if (!isOriginForm(requestTargetUri) && !isAsteriskForm(requestTargetUri)) {
// Attempt to take from HOST header before taking from the request-line
String host = inHeaders.getAsString(HttpHeaderNames.HOST);
setHttp2Authority(inHeaders,
(host == null || host.isEmpty()) ? requestTargetUri.getAuthority() : host, out);
setHttp2Authority((host == null || host.isEmpty()) ? requestTargetUri.getAuthority() : host, out);
}
} else if (in instanceof HttpResponse) {
HttpResponse response = (HttpResponse) in;
Expand Down Expand Up @@ -358,7 +357,7 @@ private static AsciiString toHttp2Path(URI uri) {
return path.isEmpty() ? EMPTY_REQUEST_PATH : new AsciiString(path);
}

private static void setHttp2Authority(HttpHeaders in, String autority, Http2Headers out) {
private static void setHttp2Authority(String autority, Http2Headers out) {
// The authority MUST NOT include the deprecated "userinfo" subcomponent
if (autority != null) {
int endOfUserInfo = autority.indexOf('@');
Expand Down

0 comments on commit 1f0154e

Please sign in to comment.