Fixed binary incompatibility with 4.3

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1603744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2014-06-19 07:52:25 +00:00
parent 48c22cc202
commit 7ae0a8ac5f
2 changed files with 12 additions and 4 deletions

View File

@ -59,7 +59,7 @@ public abstract class AbstractResponseHandler<T> implements ResponseHandler<T> {
* status code), throws an {@link HttpResponseException}.
*/
@Override
public final T handleResponse(final HttpResponse response)
public T handleResponse(final HttpResponse response)
throws HttpResponseException, IOException {
final StatusLine statusLine = response.getStatusLine();
final HttpEntity entity = response.getEntity();

View File

@ -30,17 +30,19 @@ package org.apache.http.impl.client;
import java.io.IOException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.annotation.Immutable;
import org.apache.http.client.HttpResponseException;
import org.apache.http.util.EntityUtils;
/**
* A {@link ResponseHandler} that returns the response body as a String
* A {@link org.apache.http.client.ResponseHandler} that returns the response body as a String
* for successful (2xx) responses. If the response code was >= 300, the response
* body is consumed and an {@link HttpResponseException} is thrown.
* body is consumed and an {@link org.apache.http.client.HttpResponseException} is thrown.
* <p/>
* If this is used with
* {@link org.apache.http.client.HttpClient#execute(
* org.apache.http.client.methods.HttpUriRequest, ResponseHandler)},
* org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler)},
* HttpClient may handle redirects (3xx responses) internally.
*
* @since 4.0
@ -56,4 +58,10 @@ public class BasicResponseHandler extends AbstractResponseHandler<String> {
return EntityUtils.toString(entity);
}
@Override
public String handleResponse(
final HttpResponse response) throws HttpResponseException, IOException {
return super.handleResponse(response);
}
}