Remove unnecessary conversions

Motivation:

In a `HttpConversionUtil#toHttp2Headers` a status code conversion can be replaced with using `HttpResponseStatus#codeAsText` method.

Modifications:

Apply `HttpResponseStatus#codeAsText` method.

Result:

Less allocations.
This commit is contained in:
Nikolay Fedorovskikh 2017-06-22 00:42:01 +05:00 committed by Norman Maurer
parent 6b25909f6b
commit 8f8be31226

View File

@ -361,7 +361,7 @@ public final class HttpConversionUtil {
} }
} else if (in instanceof HttpResponse) { } else if (in instanceof HttpResponse) {
HttpResponse response = (HttpResponse) in; HttpResponse response = (HttpResponse) in;
out.status(new AsciiString(Integer.toString(response.status().code()))); out.status(response.status().codeAsText());
} }
// Add the HTTP headers which have not been consumed above // Add the HTTP headers which have not been consumed above