Migrate to ApacheHttpClient 5.x Classes Namespace from 4.x
MSALMapping of all the compatible classes of ApacheHttpClient 5.x from 4.x.
org. openrewrite. apache. httpclient5. UpgradeApacheHttpClient_5_ClassMappingmod run . --recipe= org. openrewrite. apache. httpclient5. UpgradeApacheHttpClient_5_ClassMappingInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Stop inheriting constants from HttpClient 4
HttpStatus - Rename package name
org.apache.http.client.methodstoorg.apache.hc.client5.http.classic.methods - Change type
org.apache.hc.client5.http.classic.methods.CloseableHttpResponsetoorg.apache.hc.client5.http.impl.classic.CloseableHttpResponse - Change type
HttpEntityEnclosingRequestBasetoHttpUriRequestBase - Change type
HttpRequestBasetoHttpUriRequestBase - Rename package name
org.apache.http.client.entitytoorg.apache.hc.client5.http.entity - Rename package name
org.apache.http.client.protocoltoorg.apache.hc.client5.http.protocol - Rename package name
org.apache.http.conn.sockettoorg.apache.hc.client5.http.socket - Rename package name
org.apache.http.ssltoorg.apache.hc.core5.ssl - Rename package name
org.apache.http.concurrenttoorg.apache.hc.core5.concurrent - Rename package name
org.apache.http.impl.authtoorg.apache.hc.client5.http.impl.auth - Rename package name
org.apache.http.impl.cookietoorg.apache.hc.client5.http.impl.cookie - Change type
org.apache.hc.client5.http.impl.cookie.PublicSuffixListParsertoorg.apache.hc.client5.http.psl.PublicSuffixListParser - Change type
org.apache.hc.client5.http.impl.cookie.DateUtilstoorg.apache.hc.client5.http.utils.DateUtils - Change type
ProxyAuthenticationStrategytoDefaultAuthenticationStrategy - Rename package name
org.apache.http.impl.clienttoorg.apache.hc.client5.http.impl.classic - Change type
org.apache.http.impl.client.BasicAuthCachetoorg.apache.hc.client5.http.impl.auth.BasicAuthCache - Change type
org.apache.hc.client5.http.impl.classic.BasicAuthCachetoorg.apache.hc.client5.http.impl.auth.BasicAuthCache - Change type
org.apache.hc.client5.http.impl.classic.HttpAuthenticatortoorg.apache.hc.client5.http.impl.auth.HttpAuthenticator - Change type
org.apache.hc.client5.http.impl.classic.SystemDefaultCredentialsProvidertoorg.apache.hc.client5.http.impl.auth.SystemDefaultCredentialsProvider - Change type
org.apache.hc.client5.http.impl.classic.DefaultClientConnectionReuseStrategytoorg.apache.hc.client5.http.impl.DefaultClientConnectionReuseStrategy - Change type
org.apache.hc.client5.http.impl.classic.DefaultRedirectStrategytoorg.apache.hc.client5.http.impl.DefaultRedirectStrategy - Change type
org.apache.hc.client5.http.impl.classic.RedirectLocationstoorg.apache.hc.client5.http.protocol.RedirectLocations - Change type
org.apache.hc.client5.http.impl.classic.BasicCookieStoretoorg.apache.hc.client5.http.cookie.BasicCookieStore - Change type
org.apache.hc.client5.http.impl.classic.DefaultConnectionKeepAliveStrategytoorg.apache.hc.client5.http.impl.DefaultConnectionKeepAliveStrategy - Change type
org.apache.hc.client5.http.impl.classic.IdleConnectionEvictortoorg.apache.hc.client5.http.impl.IdleConnectionEvictor - Change type
org.apache.hc.client5.http.impl.classic.TunnelRefusedExceptiontoorg.apache.hc.client5.http.impl.TunnelRefusedException - Change type
org.apache.hc.client5.http.impl.classic.NoopUserTokenHandlertoorg.apache.hc.client5.http.impl.NoopUserTokenHandler - Change type
org.apache.hc.client5.http.impl.classic.DefaultUserTokenHandlertoorg.apache.hc.client5.http.impl.DefaultUserTokenHandler - Change type
org.apache.hc.client5.http.impl.classic.BasicCredentialsProvidertoorg.apache.hc.client5.http.impl.auth.BasicCredentialsProvider - Change type
AuthSchemeProvidertoAuthSchemeFactory - Change type
AuthSchemestoStandardAuthScheme - Rename package name
org.apache.http.authtoorg.apache.hc.client5.http.auth - Rename package name
org.apache.http.cookietoorg.apache.hc.client5.http.cookie - Rename package name
org.apache.http.annotationtoorg.apache.hc.core5.annotation - Rename package name
org.apache.http.client.configtoorg.apache.hc.client5.http.config - Replace constant with another constant
- Replace constant with another constant
- Replace constant with another constant
- Rename package name
org.apache.http.annotationtoorg.apache.hc.core5.annotation - Replace constant with another constant
- Change type
org.apache.http.entity.mime.HttpMultipartModetoorg.apache.hc.client5.http.entity.mime.HttpMultipartMode - Rename package name
org.apache.http.entitytoorg.apache.hc.core5.http.io.entity - Rename package name
org.apache.hc.core5.http.io.entity.mimetoorg.apache.hc.client5.http.entity.mime - Rename package name
org.apache.hc.client5.http.entity.mime.contenttoorg.apache.hc.client5.http.entity.mime - Change type
org.apache.hc.core5.http.io.entity.ContentLengthStrategytoorg.apache.hc.core5.http.ContentLengthStrategy - Change type
org.apache.hc.core5.http.io.entity.ContentTypetoorg.apache.hc.core5.http.ContentType - Change type
MinimalFieldtoMimeField - Change type
MinimalFieldtoMimeField - Replace
new StringEntity(String, String)withnew StringEntity(String, Charset) - Replace
new UrlEncodedFormEntity(List, String)withnew UrlEncodedFormEntity(Iterable, Charset) - Rename package name
org.apache.http.impl.bootstraptoorg.apache.hc.core5.http.impl.bootstrap - Rename package name
org.apache.http.impl.execchaintoorg.apache.hc.client5.http.impl.classic - Change type
org.apache.hc.client5.http.impl.classic.TunnelRefusedExceptiontoorg.apache.hc.client5.http.impl.TunnelRefusedException - Rename package name
org.apache.http.impl.iotoorg.apache.hc.core5.http.impl.io - Change type
org.apache.hc.core5.http.impl.io.DefaultHttpResponseParserFactorytoorg.apache.hc.client5.http.impl.io.DefaultHttpResponseParserFactory - Rename package name
org.apache.http.iotoorg.apache.hc.core5.http.io - Rename package name
org.apache.http.messagetoorg.apache.hc.core5.http.message - Rename package name
org.apache.http.pooltoorg.apache.hc.core5.pool - Replace constant with another constant
- Replace constant with another constant
- Change type
HTTPtoHttpHeaders - Rename package name
org.apache.http.protocoltoorg.apache.hc.core5.http.protocol - Change type
org.apache.hc.core5.http.protocol.HttpServicetoorg.apache.hc.core5.http.impl.io.HttpService - Change type
org.apache.hc.core5.http.protocol.HttpRequestExecutortoorg.apache.hc.core5.http.impl.io.HttpRequestExecutor - Change type
org.apache.hc.core5.http.protocol.HttpRequestHandlertoorg.apache.hc.core5.http.io.HttpRequestHandler - Rename package name
org.apache.http.utiltoorg.apache.hc.core5.util - Change type
org.apache.hc.core5.util.EntityUtilstoorg.apache.hc.core5.http.io.entity.EntityUtils - Change type
org.apache.http.client.utils.URIBuildertoorg.apache.hc.core5.net.URIBuilder - Change type
org.apache.http.client.utils.URLEncodedUtilstoorg.apache.hc.core5.net.URLEncodedUtils - Change type
org.apache.http.client.utils.URIUtilstoorg.apache.hc.client5.http.utils.URIUtils - Change type
org.apache.http.client.utils.DateUtilstoorg.apache.hc.client5.http.utils.DateUtils - Migrate
setCredentialsto ApacheHttpClient 5.xCredentialsStore - Migrate
clearto ApacheHttpClient 5.xCredentialsStore - Change type
org.apache.http.client.CredentialsProvidertoorg.apache.hc.client5.http.auth.CredentialsProvider - Change type
ResponseHandlertoHttpClientResponseHandler - Rename package name
org.apache.http.clienttoorg.apache.hc.client5.http - Change type
org.apache.hc.client5.http.AuthCachetoorg.apache.hc.client5.http.auth.AuthCache - Change type
org.apache.hc.client5.http.BackoffManagertoorg.apache.hc.client5.http.classic.BackoffManager - Change type
org.apache.hc.client5.http.HttpClienttoorg.apache.hc.client5.http.classic.HttpClient - Change type
HttpRequestRetryHandlertoHttpRequestRetryStrategy - Change type
org.apache.hc.client5.http.ConnectionBackoffStrategytoorg.apache.hc.client5.http.classic.ConnectionBackoffStrategy - Change type
org.apache.hc.client5.http.CookieStoretoorg.apache.hc.client5.http.cookie.CookieStore - Change type
org.apache.hc.client5.http.RedirectStrategytoorg.apache.hc.client5.http.protocol.RedirectStrategy - Change type
RequestBuildertoClassicRequestBuilder - Rename package name
org.apache.http.configtoorg.apache.hc.core5.http.config - Change type
org.apache.hc.core5.http.config.SocketConfigtoorg.apache.hc.core5.http.io.SocketConfig - Change type
org.apache.hc.core5.http.config.SocketConfig.Buildertoorg.apache.hc.core5.http.io.SocketConfig.Builder - Rename package name
org.apache.http.impl.nio.clienttoorg.apache.hc.client5.http.impl.async - Rename package name
org.apache.http.impltoorg.apache.hc.core5.http.impl.io - Change type
org.apache.hc.core5.http.impl.io.EnglishReasonPhraseCatalogtoorg.apache.hc.core5.http.impl.EnglishReasonPhraseCatalog - Change type
org.apache.hc.core5.http.impl.io.DefaultConnectionReuseStrategytoorg.apache.hc.core5.http.impl.DefaultConnectionReuseStrategy - Change type
org.apache.hc.core5.http.impl.io.DefaultHttpRequestFactorytoorg.apache.hc.core5.http.impl.nio.DefaultHttpRequestFactory - Change type
org.apache.hc.core5.http.impl.io.DefaultHttpResponseFactorytoorg.apache.hc.core5.http.impl.nio.DefaultHttpResponseFactory - Rename package name
org.apache.http.conn.utiltoorg.apache.hc.client5.http.psl - Change type
org.apache.hc.client5.http.psl.DnsUtilstoorg.apache.hc.client5.http.utils.DnsUtils - Change type
org.apache.hc.client5.http.psl.InetAddressUtilstoorg.apache.hc.core5.net.InetAddressUtils - Rename package name
org.apache.http.conn.routingtoorg.apache.hc.client5.http - Change type
org.apache.hc.client5.http.BasicRouteDirectortoorg.apache.hc.client5.http.impl.routing.BasicRouteDirector - Change type
org.apache.hc.client5.http.HttpRouteDirectortoorg.apache.hc.client5.http.routing.HttpRouteDirector - Change type
org.apache.hc.client5.http.HttpRoutePlannertoorg.apache.hc.client5.http.routing.HttpRoutePlanner - Rename package name
org.apache.http.conn.ssltoorg.apache.hc.core5.ssl - Change type
org.apache.hc.core5.ssl.SSLConnectionSocketFactorytoorg.apache.hc.client5.http.ssl.SSLConnectionSocketFactory - Change type
org.apache.hc.core5.ssl.NoopHostnameVerifiertoorg.apache.hc.client5.http.ssl.NoopHostnameVerifier - Change type
org.apache.hc.core5.ssl.DefaultHostnameVerifiertoorg.apache.hc.client5.http.ssl.DefaultHostnameVerifier - Change type
org.apache.hc.core5.ssl.TrustSelfSignedStrategytoorg.apache.hc.client5.http.ssl.TrustSelfSignedStrategy - Change type
org.apache.hc.core5.ssl.TrustAllStrategytoorg.apache.hc.client5.http.ssl.TrustAllStrategy - Change type
org.apache.hc.core5.ssl.SubjectNametoorg.apache.hc.client5.http.ssl.SubjectName - Rename package name
org.apache.http.impl.conntoorg.apache.hc.client5.http.impl.io - Change type
org.apache.hc.client5.http.impl.io.SystemDefaultDnsResolvertoorg.apache.hc.client5.http.SystemDefaultDnsResolver - Change type
org.apache.hc.client5.http.impl.io.Wiretoorg.apache.hc.client5.http.impl.Wire - Change type
org.apache.hc.client5.http.impl.io.InMemoryDnsResolvertoorg.apache.hc.client5.http.impl.InMemoryDnsResolver - Change type
org.apache.hc.client5.http.impl.io.ConnectionShutdownExceptiontoorg.apache.hc.client5.http.impl.ConnectionShutdownException - Change type
org.apache.hc.client5.http.impl.io.DefaultSchemePortResolvertoorg.apache.hc.client5.http.impl.DefaultSchemePortResolver - Change type
org.apache.hc.client5.http.impl.io.DefaultProxyRoutePlannertoorg.apache.hc.client5.http.impl.routing.DefaultProxyRoutePlanner - Change type
org.apache.hc.client5.http.impl.io.DefaultRoutePlannertoorg.apache.hc.client5.http.impl.routing.DefaultRoutePlanner - Change type
org.apache.hc.client5.http.impl.io.SystemDefaultRoutePlannertoorg.apache.hc.client5.http.impl.routing.SystemDefaultRoutePlanner - Change type
org.apache.hc.client5.http.impl.io.DefaultHttpResponseParsertoorg.apache.hc.core5.http.impl.io.DefaultHttpResponseParser - Change type
PoolingClientConnectionManagertoPoolingHttpClientConnectionManager - Change type
SchemeRegistryFactorytoDefaultSchemePortResolver - Rename package name
org.apache.http.conntoorg.apache.hc.client5.http - Change type
org.apache.hc.client5.http.ManagedHttpClientConnectiontoorg.apache.hc.client5.http.io.ManagedHttpClientConnection - Change type
org.apache.hc.client5.http.HttpClientConnectionManagertoorg.apache.hc.client5.http.io.HttpClientConnectionManager - Change type
org.apache.hc.client5.http.HttpClientConnectionOperatortoorg.apache.hc.client5.http.io.HttpClientConnectionOperator - Change type
org.apache.hc.client5.http.EofSensorWatchertoorg.apache.hc.core5.http.io.EofSensorWatcher - Change type
org.apache.hc.client5.http.EofSensorInputStreamtoorg.apache.hc.core5.http.io.EofSensorInputStream - Change type
org.apache.hc.client5.http.HttpConnectionFactorytoorg.apache.hc.core5.http.io.HttpConnectionFactory - Change type
HttpRequesttoClassicHttpRequest - Change type
HttpResponsetoClassicHttpResponse - Rename package name
org.apache.httptoorg.apache.hc.core5.http - Rename package name
org.apache.hc.core5.http.paramstoorg.apache.http.params - Add comment to import statement matching
org.apache.http.params..* - Change type
org.apache.hc.core5.http.RequestLinetoorg.apache.hc.core5.http.message.RequestLine - Change type
org.apache.hc.core5.http.HttpClientConnectiontoorg.apache.hc.core5.http.io.HttpClientConnection - Change type
org.apache.hc.core5.http.StatusLinetoorg.apache.hc.core5.http.message.StatusLine - Change type
org.apache.hc.core5.http.HttpServerConnectiontoorg.apache.hc.core5.http.io.HttpServerConnection - Change type
org.apache.hc.core5.http.HttpConnectionFactorytoorg.apache.hc.core5.http.io.HttpConnectionFactory - Change type
HttpEntityEnclosingRequesttoHttpEntityContainer - Reorder method arguments
- Reorder method arguments
- Reorder method arguments