You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2009/11/25 21:13:15 UTC
svn commit: r884245 - in
/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client:
AbstractHttpClient.java DefaultHttpClient.java
Author: olegk
Date: Wed Nov 25 20:13:14 2009
New Revision: 884245
URL: http://svn.apache.org/viewvc?rev=884245&view=rev
Log:
Fixed binary compatibility breakage
Modified:
httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java?rev=884245&r1=884244&r2=884245&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AbstractHttpClient.java Wed Nov 25 20:13:14 2009
@@ -130,8 +130,6 @@
* <li>{@link RedirectStrategy}</li> object used to determine if an HTTP
* request should be redirected to a new location in response to an HTTP
* response received from the target server.
- * The {@link #createRedirectStrategy()} must be implemented
- * by concrete super classes to instantiate this object.
* <li>{@link UserTokenHandler}</li> object used to determine if the
* execution context is user identity specific.
* The {@link #createUserTokenHandler()} must be implemented by
@@ -273,11 +271,6 @@
@Deprecated
protected abstract org.apache.http.client.RedirectHandler createRedirectHandler();
- /**
- * @since 4.1
- */
- protected abstract RedirectStrategy createRedirectStrategy();
-
protected abstract AuthenticationHandler createTargetAuthenticationHandler();
@@ -296,7 +289,6 @@
protected abstract UserTokenHandler createUserTokenHandler();
-
// non-javadoc, see interface HttpClient
public synchronized final HttpParams getParams() {
if (defaultParams == null) {
@@ -412,9 +404,10 @@
/**
* @since 4.1
*/
+ @SuppressWarnings("deprecation")
public synchronized final RedirectStrategy getRedirectStrategy() {
if (redirectStrategy == null) {
- redirectStrategy = createRedirectStrategy();
+ redirectStrategy = new DefaultRedirectStrategyAdaptor(createRedirectHandler());
}
return redirectStrategy;
}
@@ -685,7 +678,7 @@
getRoutePlanner(),
getProtocolProcessor(),
getHttpRequestRetryHandler(),
- getRedirectHandler(),
+ getRedirectStrategy(),
getTargetAuthenticationHandler(),
getProxyAuthenticationHandler(),
getUserTokenHandler(),
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java?rev=884245&r1=884244&r2=884245&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java Wed Nov 25 20:13:14 2009
@@ -36,7 +36,6 @@
import org.apache.http.client.CookieStore;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.HttpRequestRetryHandler;
-import org.apache.http.client.RedirectStrategy;
import org.apache.http.client.UserTokenHandler;
import org.apache.http.client.params.AuthPolicy;
import org.apache.http.client.params.ClientPNames;
@@ -165,6 +164,7 @@
final ClientConnectionManager conman,
final HttpParams params) {
super(conman, params);
+ setRedirectStrategy(new DefaultRedirectStrategy());
}
@@ -357,15 +357,6 @@
return new DefaultRedirectHandler();
}
- /**
- * @since 4.1
- */
- @Override
- protected RedirectStrategy createRedirectStrategy() {
- return new DefaultRedirectStrategy();
- }
-
-
@Override
protected AuthenticationHandler createTargetAuthenticationHandler() {
return new DefaultTargetAuthenticationHandler();