Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosScheme.java Sun May 24 14:12:43 2015
@@ -86,11 +86,6 @@ public class KerberosScheme extends GGSS
return super.authenticate(credentials, request, context);
}
- @Override @SuppressWarnings("deprecation")
- protected byte[] generateToken(final byte[] input, final String authServer) throws GSSException {
- return super.generateToken(input, authServer);
- }
-
@Override
protected byte[] generateToken(final byte[] input, final String authServer, final Credentials credentials) throws GSSException {
return generateGSSToken(input, new Oid(KERBEROS_OID), authServer, credentials);
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/KerberosSchemeFactory.java Sun May 24 14:12:43 2015
@@ -28,9 +28,7 @@ package org.apache.http.impl.auth;
import org.apache.http.annotation.Immutable;
import org.apache.http.auth.AuthScheme;
-import org.apache.http.auth.AuthSchemeFactory;
import org.apache.http.auth.AuthSchemeProvider;
-import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HttpContext;
/**
@@ -40,8 +38,7 @@ import org.apache.http.protocol.HttpCont
* @since 4.2
*/
@Immutable
-@SuppressWarnings("deprecation")
-public class KerberosSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
+public class KerberosSchemeFactory implements AuthSchemeProvider {
private final boolean stripPort;
private final boolean useCanonicalHostname;
@@ -74,11 +71,6 @@ public class KerberosSchemeFactory imple
}
@Override
- public AuthScheme newInstance(final HttpParams params) {
- return new KerberosScheme(this.stripPort, this.useCanonicalHostname);
- }
-
- @Override
public AuthScheme create(final HttpContext context) {
return new KerberosScheme(this.stripPort, this.useCanonicalHostname);
}
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMScheme.java Sun May 24 14:12:43 2015
@@ -36,6 +36,7 @@ import org.apache.http.auth.InvalidCrede
import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.auth.NTCredentials;
import org.apache.http.message.BufferedHeader;
+import org.apache.http.protocol.HttpContext;
import org.apache.http.util.Args;
import org.apache.http.util.CharArrayBuffer;
@@ -123,7 +124,8 @@ public class NTLMScheme extends AuthSche
@Override
public Header authenticate(
final Credentials credentials,
- final HttpRequest request) throws AuthenticationException {
+ final HttpRequest request,
+ final HttpContext context) throws AuthenticationException {
NTCredentials ntcredentials = null;
try {
ntcredentials = (NTCredentials) credentials;
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMSchemeFactory.java Sun May 24 14:12:43 2015
@@ -29,9 +29,7 @@ package org.apache.http.impl.auth;
import org.apache.http.annotation.Immutable;
import org.apache.http.auth.AuthScheme;
-import org.apache.http.auth.AuthSchemeFactory;
import org.apache.http.auth.AuthSchemeProvider;
-import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HttpContext;
/**
@@ -42,13 +40,7 @@ import org.apache.http.protocol.HttpCont
* @since 4.1
*/
@Immutable
-@SuppressWarnings("deprecation")
-public class NTLMSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
-
- @Override
- public AuthScheme newInstance(final HttpParams params) {
- return new NTLMScheme();
- }
+public class NTLMSchemeFactory implements AuthSchemeProvider {
@Override
public AuthScheme create(final HttpContext context) {
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/RFC2617Scheme.java Sun May 24 14:12:43 2015
@@ -42,7 +42,6 @@ import org.apache.http.HttpRequest;
import org.apache.http.annotation.NotThreadSafe;
import org.apache.http.auth.ChallengeState;
import org.apache.http.auth.MalformedChallengeException;
-import org.apache.http.auth.params.AuthPNames;
import org.apache.http.message.BasicHeaderValueParser;
import org.apache.http.message.HeaderValueParser;
import org.apache.http.message.ParserCursor;
@@ -56,7 +55,6 @@ import org.apache.http.util.CharsetUtils
*
* @since 4.0
*/
-@SuppressWarnings("deprecation")
@NotThreadSafe // AuthSchemeBase, params
public abstract class RFC2617Scheme extends AuthSchemeBase implements Serializable {
@@ -66,21 +64,6 @@ public abstract class RFC2617Scheme exte
private transient Charset credentialsCharset;
/**
- * Creates an instance of {@code RFC2617Scheme} with the given challenge
- * state.
- *
- * @since 4.2
- *
- * @deprecated (4.3) do not use.
- */
- @Deprecated
- public RFC2617Scheme(final ChallengeState challengeState) {
- super(challengeState);
- this.params = new HashMap<String, String>();
- this.credentialsCharset = Consts.ASCII;
- }
-
- /**
* @since 4.3
*/
public RFC2617Scheme(final Charset credentialsCharset) {
@@ -102,11 +85,7 @@ public abstract class RFC2617Scheme exte
}
String getCredentialsCharset(final HttpRequest request) {
- String charset = (String) request.getParams().getParameter(AuthPNames.CREDENTIAL_CHARSET);
- if (charset == null) {
- charset = getCredentialsCharset().name();
- }
- return charset;
+ return getCredentialsCharset().name();
}
@Override
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoScheme.java Sun May 24 14:12:43 2015
@@ -87,11 +87,6 @@ public class SPNegoScheme extends GGSSch
return super.authenticate(credentials, request, context);
}
- @Override @SuppressWarnings("deprecation")
- protected byte[] generateToken(final byte[] input, final String authServer) throws GSSException {
- return super.generateToken(input, authServer);
- }
-
@Override
protected byte[] generateToken(final byte[] input, final String authServer, final Credentials credentials) throws GSSException {
return generateGSSToken(input, new Oid(SPNEGO_OID), authServer, credentials);
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/SPNegoSchemeFactory.java Sun May 24 14:12:43 2015
@@ -28,9 +28,7 @@ package org.apache.http.impl.auth;
import org.apache.http.annotation.Immutable;
import org.apache.http.auth.AuthScheme;
-import org.apache.http.auth.AuthSchemeFactory;
import org.apache.http.auth.AuthSchemeProvider;
-import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HttpContext;
/**
@@ -40,8 +38,7 @@ import org.apache.http.protocol.HttpCont
* @since 4.2
*/
@Immutable
-@SuppressWarnings("deprecation")
-public class SPNegoSchemeFactory implements AuthSchemeFactory, AuthSchemeProvider {
+public class SPNegoSchemeFactory implements AuthSchemeProvider {
private final boolean stripPort;
private final boolean useCanonicalHostname;
@@ -74,11 +71,6 @@ public class SPNegoSchemeFactory impleme
}
@Override
- public AuthScheme newInstance(final HttpParams params) {
- return new SPNegoScheme(this.stripPort, this.useCanonicalHostname);
- }
-
- @Override
public AuthScheme create(final HttpContext context) {
return new SPNegoScheme(this.stripPort, this.useCanonicalHostname);
}
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java Sun May 24 14:12:43 2015
@@ -147,7 +147,7 @@ public class DefaultHttpRequestRetryHand
final HttpClientContext clientContext = HttpClientContext.adapt(context);
final HttpRequest request = clientContext.getRequest();
- if(requestIsAborted(request)){
+ if (request instanceof HttpUriRequest && ((HttpUriRequest)request).isAborted()) {
return false;
}
@@ -187,18 +187,4 @@ public class DefaultHttpRequestRetryHand
return !(request instanceof HttpEntityEnclosingRequest);
}
- /**
- * @since 4.2
- *
- * @deprecated (4.3)
- */
- @Deprecated
- protected boolean requestIsAborted(final HttpRequest request) {
- HttpRequest req = request;
- if (request instanceof RequestWrapper) { // does not forward request to original
- req = ((RequestWrapper) request).getOriginal();
- }
- return (req instanceof HttpUriRequest && ((HttpUriRequest)req).isAborted());
- }
-
}
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java Sun May 24 14:12:43 2015
@@ -75,12 +75,6 @@ public class DefaultRedirectStrategy imp
private final Log log = LogFactory.getLog(getClass());
- /**
- * @deprecated (4.3) use {@link org.apache.http.client.protocol.HttpClientContext#REDIRECT_LOCATIONS}.
- */
- @Deprecated
- public static final String REDIRECT_LOCATIONS = "http.protocol.redirect-locations";
-
public static final DefaultRedirectStrategy INSTANCE = new DefaultRedirectStrategy();
/**
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/HttpClientBuilder.java Sun May 24 14:12:43 2015
@@ -82,7 +82,6 @@ import org.apache.http.conn.socket.Layer
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
import org.apache.http.conn.ssl.DefaultHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.X509HostnameVerifier;
import org.apache.http.conn.util.PublicSuffixMatcher;
import org.apache.http.conn.util.PublicSuffixMatcherLoader;
import org.apache.http.cookie.CookieSpecProvider;
@@ -232,22 +231,6 @@ public class HttpClientBuilder {
}
/**
- * Assigns {@link X509HostnameVerifier} instance.
- * <p>
- * Please note this value can be overridden by the {@link #setConnectionManager(
- * org.apache.http.conn.HttpClientConnectionManager)} and the {@link #setSSLSocketFactory(
- * org.apache.http.conn.socket.LayeredConnectionSocketFactory)} methods.
- * </p>
- *
- * @deprecated (4.4)
- */
- @Deprecated
- public final HttpClientBuilder setHostnameVerifier(final X509HostnameVerifier hostnameVerifier) {
- this.hostnameVerifier = hostnameVerifier;
- return this;
- }
-
- /**
* Assigns {@link javax.net.ssl.HostnameVerifier} instance.
* <p>
* Please note this value can be overridden by the {@link #setConnectionManager(
@@ -283,21 +266,6 @@ public class HttpClientBuilder {
* org.apache.http.conn.HttpClientConnectionManager)} and the {@link #setSSLSocketFactory(
* org.apache.http.conn.socket.LayeredConnectionSocketFactory)} methods.
* </p>
- *
- * @deprecated (4.5) use {@link #setSSLContext(SSLContext)}
- */
- @Deprecated
- public final HttpClientBuilder setSslcontext(final SSLContext sslcontext) {
- return setSSLContext(sslcontext);
- }
-
- /**
- * Assigns {@link SSLContext} instance.
- * <p>
- * Please note this value can be overridden by the {@link #setConnectionManager(
- * org.apache.http.conn.HttpClientConnectionManager)} and the {@link #setSSLSocketFactory(
- * org.apache.http.conn.socket.LayeredConnectionSocketFactory)} methods.
- * </p>
*/
public final HttpClientBuilder setSSLContext(final SSLContext sslContext) {
this.sslContext = sslContext;
@@ -794,36 +762,6 @@ public class HttpClientBuilder {
}
/**
- * Makes this instance of HttpClient proactively evict idle connections from the
- * connection pool using a background thread.
- * <p>
- * One MUST explicitly close HttpClient with {@link CloseableHttpClient#close()} in order
- * to stop and release the background thread.
- * <p>
- * Please note this method has no effect if the instance of HttpClient is configuted to
- * use a shared connection manager.
- * <p>
- * Please note this method may not be used when the instance of HttpClient is created
- * inside an EJB container.
- *
- * @see #setConnectionManagerShared(boolean)
- * @see org.apache.http.conn.HttpClientConnectionManager#closeExpiredConnections()
- *
- * @param maxIdleTime maximum time persistent connections can stay idle while kept alive
- * in the connection pool. Connections whose inactivity period exceeds this value will
- * get closed and evicted from the pool.
- * @param maxIdleTimeUnit time unit for the above parameter.
- *
- * @deprecated (4.5) use {@link #evictIdleConnections(long, TimeUnit)}
- *
- * @since 4.4
- */
- @Deprecated
- public final HttpClientBuilder evictIdleConnections(final Long maxIdleTime, final TimeUnit maxIdleTimeUnit) {
- return evictIdleConnections(maxIdleTime.longValue(), maxIdleTimeUnit);
- }
-
- /**
* Makes this instance of HttpClient proactively evict idle connections from the
* connection pool using a background thread.
* <p>
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java Sun May 24 14:12:43 2015
@@ -30,7 +30,6 @@ package org.apache.http.impl.client;
import java.io.Closeable;
import java.io.IOException;
import java.util.List;
-import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -48,21 +47,13 @@ import org.apache.http.client.methods.Cl
import org.apache.http.client.methods.Configurable;
import org.apache.http.client.methods.HttpExecutionAware;
import org.apache.http.client.methods.HttpRequestWrapper;
-import org.apache.http.client.params.ClientPNames;
-import org.apache.http.client.params.HttpClientParamConfig;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.config.Lookup;
-import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.ClientConnectionRequest;
import org.apache.http.conn.HttpClientConnectionManager;
-import org.apache.http.conn.ManagedClientConnection;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.conn.routing.HttpRoutePlanner;
-import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.cookie.CookieSpecProvider;
import org.apache.http.impl.execchain.ClientExecChain;
-import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpParamsNames;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.Args;
@@ -73,7 +64,6 @@ import org.apache.http.util.Args;
* @since 4.3
*/
@ThreadSafe
-@SuppressWarnings("deprecation")
class InternalHttpClient extends CloseableHttpClient implements Configurable {
private final Log log = LogFactory.getLog(getClass());
@@ -117,11 +107,7 @@ class InternalHttpClient extends Closeab
final HttpHost target,
final HttpRequest request,
final HttpContext context) throws HttpException {
- HttpHost host = target;
- if (host == null) {
- host = (HttpHost) request.getParams().getParameter(ClientPNames.DEFAULT_HOST);
- }
- return this.routePlanner.determineRoute(host, request, context);
+ return this.routePlanner.determineRoute(target, request, context);
}
private void setupContext(final HttpClientContext context) {
@@ -166,16 +152,6 @@ class InternalHttpClient extends Closeab
if (request instanceof Configurable) {
config = ((Configurable) request).getConfig();
}
- if (config == null) {
- final HttpParams params = request.getParams();
- if (params instanceof HttpParamsNames) {
- if (!((HttpParamsNames) params).getNames().isEmpty()) {
- config = HttpClientParamConfig.getRequestConfig(params);
- }
- } else {
- config = HttpClientParamConfig.getRequestConfig(params);
- }
- }
if (config != null) {
localcontext.setRequestConfig(config);
}
@@ -205,51 +181,4 @@ class InternalHttpClient extends Closeab
}
}
- @Override
- public HttpParams getParams() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public ClientConnectionManager getConnectionManager() {
-
- return new ClientConnectionManager() {
-
- @Override
- public void shutdown() {
- connManager.shutdown();
- }
-
- @Override
- public ClientConnectionRequest requestConnection(
- final HttpRoute route, final Object state) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void releaseConnection(
- final ManagedClientConnection conn,
- final long validDuration, final TimeUnit timeUnit) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public SchemeRegistry getSchemeRegistry() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
- connManager.closeIdleConnections(idletime, tunit);
- }
-
- @Override
- public void closeExpiredConnections() {
- connManager.closeExpiredConnections();
- }
-
- };
-
- }
-
}
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/MinimalHttpClient.java Sun May 24 14:12:43 2015
@@ -28,7 +28,6 @@
package org.apache.http.impl.client;
import java.io.IOException;
-import java.util.concurrent.TimeUnit;
import org.apache.http.HttpException;
import org.apache.http.HttpHost;
@@ -41,16 +40,10 @@ import org.apache.http.client.methods.Co
import org.apache.http.client.methods.HttpExecutionAware;
import org.apache.http.client.methods.HttpRequestWrapper;
import org.apache.http.client.protocol.HttpClientContext;
-import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.ClientConnectionRequest;
import org.apache.http.conn.HttpClientConnectionManager;
-import org.apache.http.conn.ManagedClientConnection;
import org.apache.http.conn.routing.HttpRoute;
-import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.impl.DefaultConnectionReuseStrategy;
import org.apache.http.impl.execchain.MinimalClientExec;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpParams;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.HttpRequestExecutor;
@@ -62,12 +55,10 @@ import org.apache.http.util.Args;
* @since 4.3
*/
@ThreadSafe
-@SuppressWarnings("deprecation")
class MinimalHttpClient extends CloseableHttpClient {
private final HttpClientConnectionManager connManager;
private final MinimalClientExec requestExecutor;
- private final HttpParams params;
public MinimalHttpClient(
final HttpClientConnectionManager connManager) {
@@ -78,7 +69,6 @@ class MinimalHttpClient extends Closeabl
connManager,
DefaultConnectionReuseStrategy.INSTANCE,
DefaultConnectionKeepAliveStrategy.INSTANCE);
- this.params = new BasicHttpParams();
}
@Override
@@ -111,55 +101,8 @@ class MinimalHttpClient extends Closeabl
}
@Override
- public HttpParams getParams() {
- return this.params;
- }
-
- @Override
public void close() {
this.connManager.shutdown();
}
- @Override
- public ClientConnectionManager getConnectionManager() {
-
- return new ClientConnectionManager() {
-
- @Override
- public void shutdown() {
- connManager.shutdown();
- }
-
- @Override
- public ClientConnectionRequest requestConnection(
- final HttpRoute route, final Object state) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void releaseConnection(
- final ManagedClientConnection conn,
- final long validDuration, final TimeUnit timeUnit) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public SchemeRegistry getSchemeRegistry() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void closeIdleConnections(final long idletime, final TimeUnit tunit) {
- connManager.closeIdleConnections(idletime, tunit);
- }
-
- @Override
- public void closeExpiredConnections() {
- connManager.closeExpiredConnections();
- }
-
- };
-
- }
-
}
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ProxyClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ProxyClient.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ProxyClient.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/ProxyClient.java Sun May 24 14:12:43 2015
@@ -38,16 +38,17 @@ import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.HttpVersion;
import org.apache.http.auth.AUTH;
-import org.apache.http.auth.AuthSchemeRegistry;
+import org.apache.http.auth.AuthSchemeProvider;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.AuthState;
import org.apache.http.auth.Credentials;
import org.apache.http.client.config.AuthSchemes;
import org.apache.http.client.config.RequestConfig;
-import org.apache.http.client.params.HttpClientParamConfig;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.client.protocol.RequestClientConnControl;
import org.apache.http.config.ConnectionConfig;
+import org.apache.http.config.Lookup;
+import org.apache.http.config.RegistryBuilder;
import org.apache.http.conn.HttpConnectionFactory;
import org.apache.http.conn.ManagedHttpClientConnection;
import org.apache.http.conn.routing.HttpRoute;
@@ -64,9 +65,6 @@ import org.apache.http.impl.auth.SPNegoS
import org.apache.http.impl.conn.ManagedHttpClientConnectionFactory;
import org.apache.http.impl.execchain.TunnelRefusedException;
import org.apache.http.message.BasicHttpRequest;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpParamConfig;
-import org.apache.http.params.HttpParams;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.HttpCoreContext;
@@ -81,7 +79,6 @@ import org.apache.http.util.EntityUtils;
/**
* ProxyClient can be used to establish a tunnel via an HTTP proxy.
*/
-@SuppressWarnings("deprecation")
public class ProxyClient {
private final HttpConnectionFactory<HttpRoute, ManagedHttpClientConnection> connFactory;
@@ -92,7 +89,7 @@ public class ProxyClient {
private final ProxyAuthenticationStrategy proxyAuthStrategy;
private final HttpAuthenticator authenticator;
private final AuthState proxyAuthState;
- private final AuthSchemeRegistry authSchemeRegistry;
+ private final Lookup<AuthSchemeProvider> authSchemeRegistry;
private final ConnectionReuseStrategy reuseStrategy;
/**
@@ -112,26 +109,17 @@ public class ProxyClient {
this.proxyAuthStrategy = new ProxyAuthenticationStrategy();
this.authenticator = new HttpAuthenticator();
this.proxyAuthState = new AuthState();
- this.authSchemeRegistry = new AuthSchemeRegistry();
- this.authSchemeRegistry.register(AuthSchemes.BASIC, new BasicSchemeFactory());
- this.authSchemeRegistry.register(AuthSchemes.DIGEST, new DigestSchemeFactory());
- this.authSchemeRegistry.register(AuthSchemes.NTLM, new NTLMSchemeFactory());
- this.authSchemeRegistry.register(AuthSchemes.SPNEGO, new SPNegoSchemeFactory());
- this.authSchemeRegistry.register(AuthSchemes.KERBEROS, new KerberosSchemeFactory());
+ this.authSchemeRegistry = RegistryBuilder.<AuthSchemeProvider>create()
+ .register(AuthSchemes.BASIC, new BasicSchemeFactory())
+ .register(AuthSchemes.DIGEST, new DigestSchemeFactory())
+ .register(AuthSchemes.NTLM, new NTLMSchemeFactory())
+ .register(AuthSchemes.SPNEGO, new SPNegoSchemeFactory())
+ .register(AuthSchemes.KERBEROS, new KerberosSchemeFactory())
+ .build();
this.reuseStrategy = new DefaultConnectionReuseStrategy();
}
/**
- * @deprecated (4.3) use {@link ProxyClient#ProxyClient(HttpConnectionFactory, ConnectionConfig, RequestConfig)}
- */
- @Deprecated
- public ProxyClient(final HttpParams params) {
- this(null,
- HttpParamConfig.getConnectionConfig(params),
- HttpClientParamConfig.getRequestConfig(params));
- }
-
- /**
* @since 4.3
*/
public ProxyClient(final RequestConfig requestConfig) {
@@ -142,22 +130,6 @@ public class ProxyClient {
this(null, null, null);
}
- /**
- * @deprecated (4.3) do not use.
- */
- @Deprecated
- public HttpParams getParams() {
- return new BasicHttpParams();
- }
-
- /**
- * @deprecated (4.3) do not use.
- */
- @Deprecated
- public AuthSchemeRegistry getAuthSchemeRegistry() {
- return this.authSchemeRegistry;
- }
-
public Socket tunnel(
final HttpHost proxy,
final HttpHost target,
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpResponseParser.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpResponseParser.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpResponseParser.java Sun May 24 14:12:43 2015
@@ -44,8 +44,6 @@ import org.apache.http.impl.io.AbstractM
import org.apache.http.io.SessionInputBuffer;
import org.apache.http.message.LineParser;
import org.apache.http.message.ParserCursor;
-import org.apache.http.params.HttpParams;
-import org.apache.http.util.Args;
import org.apache.http.util.CharArrayBuffer;
/**
@@ -54,7 +52,6 @@ import org.apache.http.util.CharArrayBuf
*
* @since 4.2
*/
-@SuppressWarnings("deprecation")
@NotThreadSafe
public class DefaultHttpResponseParser extends AbstractMessageParser<HttpResponse> {
@@ -64,22 +61,6 @@ public class DefaultHttpResponseParser e
private final CharArrayBuffer lineBuf;
/**
- * @deprecated (4.3) use {@link DefaultHttpResponseParser#DefaultHttpResponseParser(
- * SessionInputBuffer, LineParser, HttpResponseFactory, MessageConstraints)}
- */
- @Deprecated
- public DefaultHttpResponseParser(
- final SessionInputBuffer buffer,
- final LineParser parser,
- final HttpResponseFactory responseFactory,
- final HttpParams params) {
- super(buffer, parser, params);
- Args.notNull(responseFactory, "Response factory");
- this.responseFactory = responseFactory;
- this.lineBuf = new CharArrayBuffer(128);
- }
-
- /**
* Creates new instance of DefaultHttpResponseParser.
*
* @param buffer the session input buffer.
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/AbstractCookieSpec.java Sun May 24 14:12:43 2015
@@ -36,7 +36,6 @@ import org.apache.http.annotation.Thread
import org.apache.http.cookie.CommonCookieAttributeHandler;
import org.apache.http.cookie.CookieAttributeHandler;
import org.apache.http.cookie.CookieSpec;
-import org.apache.http.util.Args;
import org.apache.http.util.Asserts;
/**
@@ -84,19 +83,6 @@ public abstract class AbstractCookieSpec
}
/**
- * @deprecated (4.4) use {@link #AbstractCookieSpec(java.util.HashMap)} or
- * {@link #AbstractCookieSpec(org.apache.http.cookie.CommonCookieAttributeHandler...)}
- * constructors instead.
- */
- @Deprecated
- public void registerAttribHandler(
- final String name, final CookieAttributeHandler handler) {
- Args.notNull(name, "Attribute name");
- Args.notNull(handler, "Attribute handler");
- this.attribHandlerMap.put(name, handler);
- }
-
- /**
* Finds an attribute handler {@link CookieAttributeHandler} for the
* given attribute. Returns {@code null} if no attribute handler is
* found for the specified attribute.
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java Sun May 24 14:12:43 2015
@@ -83,7 +83,6 @@ import org.apache.http.util.EntityUtils;
*
* @since 4.3
*/
-@SuppressWarnings("deprecation")
@Immutable
public class MainClientExec implements ClientExecChain {
@@ -201,17 +200,6 @@ public class MainClientExec implements C
context.setAttribute(HttpCoreContext.HTTP_CONNECTION, managedConn);
- if (config.isStaleConnectionCheckEnabled()) {
- // validate connection
- if (managedConn.isOpen()) {
- this.log.debug("Stale connection check");
- if (managedConn.isStale()) {
- this.log.debug("Stale connection detected");
- managedConn.close();
- }
- }
- }
-
final ConnectionHolder connHolder = new ConnectionHolder(this.log, this.connManager, managedConn);
try {
if (execAware != null) {
Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ProtocolExec.java Sun May 24 14:12:43 2015
@@ -45,12 +45,10 @@ import org.apache.http.client.methods.Cl
import org.apache.http.client.methods.HttpExecutionAware;
import org.apache.http.client.methods.HttpRequestWrapper;
import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.client.utils.URIUtils;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.impl.client.BasicCredentialsProvider;
-import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HttpCoreContext;
import org.apache.http.protocol.HttpProcessor;
import org.apache.http.util.Args;
@@ -70,7 +68,6 @@ import org.apache.http.util.Args;
* @since 4.3
*/
@Immutable
-@SuppressWarnings("deprecation")
public class ProtocolExec implements ClientExecChain {
private final Log log = LogFactory.getLog(getClass());
@@ -130,27 +127,9 @@ public class ProtocolExec implements Cli
// Re-write request URI if needed
rewriteRequestURI(request, route);
- final HttpParams params = request.getParams();
- HttpHost virtualHost = (HttpHost) params.getParameter(ClientPNames.VIRTUAL_HOST);
- // HTTPCLIENT-1092 - add the port if necessary
- if (virtualHost != null && virtualHost.getPort() == -1) {
- final int port = route.getTargetHost().getPort();
- if (port != -1) {
- virtualHost = new HttpHost(virtualHost.getHostName(), port,
- virtualHost.getSchemeName());
- }
- if (this.log.isDebugEnabled()) {
- this.log.debug("Using virtual host" + virtualHost);
- }
- }
-
HttpHost target = null;
- if (virtualHost != null) {
- target = virtualHost;
- } else {
- if (uri != null && uri.isAbsolute() && uri.getHost() != null) {
- target = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme());
- }
+ if (uri != null && uri.isAbsolute() && uri.getHost() != null) {
+ target = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme());
}
if (target == null) {
target = request.getTarget();
Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestHttpAuthenticator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestHttpAuthenticator.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestHttpAuthenticator.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestHttpAuthenticator.java Sun May 24 14:12:43 2015
@@ -39,11 +39,11 @@ import org.apache.http.HttpVersion;
import org.apache.http.auth.AUTH;
import org.apache.http.auth.AuthOption;
import org.apache.http.auth.AuthProtocolState;
+import org.apache.http.auth.AuthScheme;
import org.apache.http.auth.AuthSchemeProvider;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.AuthState;
import org.apache.http.auth.AuthenticationException;
-import org.apache.http.auth.ContextAwareAuthScheme;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.client.AuthCache;
@@ -69,7 +69,7 @@ public class TestHttpAuthenticator {
private AuthenticationStrategy defltAuthStrategy;
private AuthState authState;
- private ContextAwareAuthScheme authScheme;
+ private AuthScheme authScheme;
private HttpContext context;
private HttpHost defaultHost;
private Credentials credentials;
@@ -82,7 +82,7 @@ public class TestHttpAuthenticator {
public void setUp() throws Exception {
this.defltAuthStrategy = Mockito.mock(AuthenticationStrategy.class);
this.authState = new AuthState();
- this.authScheme = Mockito.mock(ContextAwareAuthScheme.class);
+ this.authScheme = Mockito.mock(AuthScheme.class);
Mockito.when(this.authScheme.getSchemeName()).thenReturn("Basic");
Mockito.when(this.authScheme.isComplete()).thenReturn(Boolean.TRUE);
this.context = new BasicHttpContext();
@@ -435,12 +435,12 @@ public class TestHttpAuthenticator {
this.authState.setState(AuthProtocolState.CHALLENGED);
final LinkedList<AuthOption> authOptions = new LinkedList<AuthOption>();
- final ContextAwareAuthScheme authScheme1 = Mockito.mock(ContextAwareAuthScheme.class);
+ final AuthScheme authScheme1 = Mockito.mock(AuthScheme.class);
Mockito.doThrow(new AuthenticationException()).when(authScheme1).authenticate(
Mockito.any(Credentials.class),
Mockito.any(HttpRequest.class),
Mockito.any(HttpContext.class));
- final ContextAwareAuthScheme authScheme2 = Mockito.mock(ContextAwareAuthScheme.class);
+ final AuthScheme authScheme2 = Mockito.mock(AuthScheme.class);
Mockito.when(authScheme2.authenticate(
Mockito.any(Credentials.class),
Mockito.any(HttpRequest.class),
Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestRFC2617Scheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestRFC2617Scheme.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestRFC2617Scheme.java (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/auth/TestRFC2617Scheme.java Sun May 24 14:12:43 2015
@@ -42,6 +42,7 @@ import org.apache.http.auth.Credentials;
import org.apache.http.auth.MalformedChallengeException;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BufferedHeader;
+import org.apache.http.protocol.HttpContext;
import org.apache.http.util.CharArrayBuffer;
import org.junit.Assert;
import org.junit.Test;
@@ -61,10 +62,10 @@ public class TestRFC2617Scheme {
}
@Override
- @Deprecated
public Header authenticate(
final Credentials credentials,
- final HttpRequest request) throws AuthenticationException {
+ final HttpRequest request,
+ final HttpContext context) throws AuthenticationException {
return null;
}
Modified: httpcomponents/httpclient/trunk/httpmime/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/pom.xml?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/pom.xml (original)
+++ httpcomponents/httpclient/trunk/httpmime/pom.xml Sun May 24 14:12:43 2015
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
- <version>4.5-alpha1-SNAPSHOT</version>
+ <version>5.0-alpha1-SNAPSHOT</version>
</parent>
<artifactId>httpmime</artifactId>
<name>Apache HttpClient Mime</name>
@@ -69,27 +69,6 @@
</includes>
</resource>
</resources>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.8</version>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>src/main/java-deprecated</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
</build>
<reporting>
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/FormBodyPart.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/FormBodyPart.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/FormBodyPart.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/FormBodyPart.java Sun May 24 14:12:43 2015
@@ -27,8 +27,6 @@
package org.apache.http.entity.mime;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.mime.content.AbstractContentBody;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.util.Args;
@@ -54,23 +52,6 @@ public class FormBodyPart {
this.header = header != null ? header : new Header();
}
- /**
- * @deprecated (4.4) use {@link org.apache.http.entity.mime.FormBodyPartBuilder}.
- */
- @Deprecated
- public FormBodyPart(final String name, final ContentBody body) {
- super();
- Args.notNull(name, "Name");
- Args.notNull(body, "Body");
- this.name = name;
- this.body = body;
- this.header = new Header();
-
- generateContentDisp(body);
- generateContentType(body);
- generateTransferEncoding(body);
- }
-
public String getName() {
return this.name;
}
@@ -88,53 +69,4 @@ public class FormBodyPart {
this.header.addField(new MinimalField(name, value));
}
- /**
- * @deprecated (4.4) use {@link org.apache.http.entity.mime.FormBodyPartBuilder}.
- */
- @Deprecated
- protected void generateContentDisp(final ContentBody body) {
- final StringBuilder buffer = new StringBuilder();
- buffer.append("form-data; name=\"");
- buffer.append(getName());
- buffer.append("\"");
- if (body.getFilename() != null) {
- buffer.append("; filename=\"");
- buffer.append(body.getFilename());
- buffer.append("\"");
- }
- addField(MIME.CONTENT_DISPOSITION, buffer.toString());
- }
-
- /**
- * @deprecated (4.4) use {@link org.apache.http.entity.mime.FormBodyPartBuilder}.
- */
- @Deprecated
- protected void generateContentType(final ContentBody body) {
- final ContentType contentType;
- if (body instanceof AbstractContentBody) {
- contentType = ((AbstractContentBody) body).getContentType();
- } else {
- contentType = null;
- }
- if (contentType != null) {
- addField(MIME.CONTENT_TYPE, contentType.toString());
- } else {
- final StringBuilder buffer = new StringBuilder();
- buffer.append(body.getMimeType()); // MimeType cannot be null
- if (body.getCharset() != null) { // charset may legitimately be null
- buffer.append("; charset=");
- buffer.append(body.getCharset());
- }
- addField(MIME.CONTENT_TYPE, buffer.toString());
- }
- }
-
- /**
- * @deprecated (4.4) use {@link org.apache.http.entity.mime.FormBodyPartBuilder}.
- */
- @Deprecated
- protected void generateTransferEncoding(final ContentBody body) {
- addField(MIME.CONTENT_TRANSFER_ENC, body.getTransferEncoding()); // TE cannot be null
- }
-
}
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntityBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntityBuilder.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntityBuilder.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartEntityBuilder.java Sun May 24 14:12:43 2015
@@ -105,16 +105,6 @@ public class MultipartEntityBuilder {
}
/**
- * @since 4.4
- *
- * @deprecated (4.5) Use {@link #setContentType(org.apache.http.entity.ContentType)}.
- */
- @Deprecated
- public MultipartEntityBuilder seContentType(final ContentType contentType) {
- return setContentType(contentType);
- }
-
- /**
* @since 4.5
*/
public MultipartEntityBuilder setContentType(final ContentType contentType) {
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/MultipartFormEntity.java Sun May 24 14:12:43 2015
@@ -27,17 +27,16 @@
package org.apache.http.entity.mime;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.message.BasicHeader;
import org.apache.http.protocol.HTTP;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-@SuppressWarnings("deprecation")
class MultipartFormEntity implements HttpEntity {
private final AbstractMultipartForm multipart;
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/AbstractContentBody.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/AbstractContentBody.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/AbstractContentBody.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/AbstractContentBody.java Sun May 24 14:12:43 2015
@@ -50,14 +50,6 @@ public abstract class AbstractContentBod
}
/**
- * @deprecated (4.3) use {@link AbstractContentBody#AbstractContentBody(ContentType)}
- */
- @Deprecated
- public AbstractContentBody(final String mimeType) {
- this(ContentType.parse(mimeType));
- }
-
- /**
* @since 4.3
*/
public ContentType getContentType() {
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/ByteArrayBody.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/ByteArrayBody.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/ByteArrayBody.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/ByteArrayBody.java Sun May 24 14:12:43 2015
@@ -53,21 +53,6 @@ public class ByteArrayBody extends Abstr
private final String filename;
/**
- * Creates a new ByteArrayBody.
- *
- * @param data The contents of the file contained in this part.
- * @param mimeType The MIME type of the file contained in this part.
- * @param filename The name of the file contained in this part.
- *
- * @deprecated (4.3) use {@link ByteArrayBody#ByteArrayBody(byte[], ContentType, String)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public ByteArrayBody(final byte[] data, final String mimeType, final String filename) {
- this(data, ContentType.create(mimeType), filename);
- }
-
- /**
* @since 4.3
*/
public ByteArrayBody(final byte[] data, final ContentType contentType, final String filename) {
@@ -84,7 +69,7 @@ public class ByteArrayBody extends Abstr
* @param filename The name of the file contained in this part.
*/
public ByteArrayBody(final byte[] data, final String filename) {
- this(data, "application/octet-stream", filename);
+ this(data, ContentType.APPLICATION_OCTET_STREAM, filename);
}
@Override
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/FileBody.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/FileBody.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/FileBody.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/FileBody.java Sun May 24 14:12:43 2015
@@ -49,42 +49,6 @@ public class FileBody extends AbstractCo
private final File file;
private final String filename;
- /**
- * @since 4.1
- *
- * @deprecated (4.3) use {@link FileBody#FileBody(File, ContentType, String)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public FileBody(final File file,
- final String filename,
- final String mimeType,
- final String charset) {
- this(file, ContentType.create(mimeType, charset), filename);
- }
-
- /**
- * @since 4.1
- *
- * @deprecated (4.3) use {@link FileBody#FileBody(File, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public FileBody(final File file,
- final String mimeType,
- final String charset) {
- this(file, null, mimeType, charset);
- }
-
- /**
- * @deprecated (4.3) use {@link FileBody#FileBody(File, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public FileBody(final File file, final String mimeType) {
- this(file, ContentType.create(mimeType), null);
- }
-
public FileBody(final File file) {
this(file, ContentType.DEFAULT_BINARY, file != null ? file.getName() : null);
}
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/InputStreamBody.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/InputStreamBody.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/InputStreamBody.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/InputStreamBody.java Sun May 24 14:12:43 2015
@@ -47,17 +47,6 @@ public class InputStreamBody extends Abs
private final InputStream in;
private final String filename;
- /**
- * @since 4.1
- *
- * @deprecated (4.3) use {@link InputStreamBody#InputStreamBody(InputStream, ContentType,
- * String)} or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public InputStreamBody(final InputStream in, final String mimeType, final String filename) {
- this(in, ContentType.create(mimeType), filename);
- }
-
public InputStreamBody(final InputStream in, final String filename) {
this(in, ContentType.DEFAULT_BINARY, filename);
}
Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/content/StringBody.java Sun May 24 14:12:43 2015
@@ -33,7 +33,6 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.Reader;
-import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import org.apache.http.Consts;
@@ -53,101 +52,6 @@ public class StringBody extends Abstract
private final byte[] content;
/**
- * @since 4.1
- *
- * @deprecated (4.3) use {@link StringBody#StringBody(String, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public static StringBody create(
- final String text,
- final String mimeType,
- final Charset charset) throws IllegalArgumentException {
- try {
- return new StringBody(text, mimeType, charset);
- } catch (final UnsupportedEncodingException ex) {
- throw new IllegalArgumentException("Charset " + charset + " is not supported", ex);
- }
- }
-
- /**
- * @since 4.1
- *
- * @deprecated (4.3) use {@link StringBody#StringBody(String, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public static StringBody create(
- final String text, final Charset charset) throws IllegalArgumentException {
- return create(text, null, charset);
- }
-
- /**
- * @since 4.1
- *
- * @deprecated (4.3) use {@link StringBody#StringBody(String, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public static StringBody create(final String text) throws IllegalArgumentException {
- return create(text, null, null);
- }
-
- /**
- * Create a StringBody from the specified text, MIME type and character set.
- *
- * @param text to be used for the body, not {@code null}
- * @param mimeType the MIME type, not {@code null}
- * @param charset the character set, may be {@code null}, in which case the US-ASCII charset is used
- * @throws UnsupportedEncodingException
- * @throws IllegalArgumentException if the {@code text} parameter is null
- *
- * @deprecated (4.3) use {@link StringBody#StringBody(String, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public StringBody(
- final String text,
- final String mimeType,
- final Charset charset) throws UnsupportedEncodingException {
- this(text, ContentType.create(mimeType, charset));
- }
-
- /**
- * Create a StringBody from the specified text and character set.
- * The MIME type is set to "text/plain".
- *
- * @param text to be used for the body, not {@code null}
- * @param charset the character set, may be {@code null}, in which case the US-ASCII charset is used
- * @throws UnsupportedEncodingException
- * @throws IllegalArgumentException if the {@code text} parameter is null
- *
- * @deprecated (4.3) use {@link StringBody#StringBody(String, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public StringBody(final String text, final Charset charset) throws UnsupportedEncodingException {
- this(text, "text/plain", charset);
- }
-
- /**
- * Create a StringBody from the specified text.
- * The MIME type is set to "text/plain".
- * The {@linkplain Consts#ASCII ASCII} charset is used.
- *
- * @param text to be used for the body, not {@code null}
- * @throws UnsupportedEncodingException
- * @throws IllegalArgumentException if the {@code text} parameter is null
- *
- * @deprecated (4.3) use {@link StringBody#StringBody(String, ContentType)}
- * or {@link org.apache.http.entity.mime.MultipartEntityBuilder}
- */
- @Deprecated
- public StringBody(final String text) throws UnsupportedEncodingException {
- this(text, "text/plain", Consts.ASCII);
- }
-
- /**
* @since 4.3
*/
public StringBody(final String text, final ContentType contentType) {
Modified: httpcomponents/httpclient/trunk/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/pom.xml?rev=1681460&r1=1681459&r2=1681460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/pom.xml (original)
+++ httpcomponents/httpclient/trunk/pom.xml Sun May 24 14:12:43 2015
@@ -33,7 +33,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>httpcomponents-client</artifactId>
<name>Apache HttpComponents Client</name>
- <version>4.5-alpha1-SNAPSHOT</version>
+ <version>5.0-alpha1-SNAPSHOT</version>
<description>Apache HttpComponents Client is a library of components for building client side HTTP services</description>
<url>http://hc.apache.org/httpcomponents-client</url>
<inceptionYear>1999</inceptionYear>
@@ -358,14 +358,6 @@
</executions>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>clirr-maven-plugin</artifactId>
- <version>${hc.clirr.version}</version>
- <configuration>
- <comparisonVersion>${api.comparison.version}</comparisonVersion>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.11</version>
|