Migrate to Apache HttpCore Nio Classes to Apache HttpCore 5.x
MSALMapping of all the compatible classes of Apache HttpCore 5.x from Apache HttpCore Nio 4.4.x.
org. openrewrite. apache. httpclient5. UpgradeApacheHttpCore_5_NioClassMappingmod run . --recipe= org. openrewrite. apache. httpclient5. UpgradeApacheHttpCore_5_NioClassMappingInstall 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.
- Migrate from httpcore-nio to ApacheHttpClient 5.x core dependency
- Migrate to Apache HttpCore Nio Util Classes to Apache HttpCore 5.x
- Change type
org.apache.http.impl.nio.reactor.IOReactorConfigtoorg.apache.hc.core5.reactor.IOReactorConfig - Change method invocation return type
- Remove method invocations
org.apache.hc.core5.reactor.IOReactorConfig getShutdownGracePeriod() - Remove method invocations
org.apache.hc.core5.reactor.IOReactorConfig isInterestOpQueued() - Change method invocation return type
- Change method invocation return type
- Remove method invocations
org.apache.hc.core5.reactor.IOReactorConfig getConnectTimeout() - Change type
org.apache.http.impl.nio.reactor.IOReactorConfig.Buildertoorg.apache.hc.core5.reactor.IOReactorConfig.Builder - Changes an argument (or pair of arguments) to a
TimeValuefor matched method invocationsorg.apache.hc.core5.reactor.IOReactorConfig.Builder setSelectInterval(long) - Remove method invocations
org.apache.hc.core5.reactor.IOReactorConfig.Builder setShutdownGracePeriod(long) - Remove method invocations
org.apache.hc.core5.reactor.IOReactorConfig.Builder setInterestOpQueued(boolean) - Adds a TimeUnit argument to the matched method invocations
org.apache.hc.core5.reactor.IOReactorConfig.Builder setSoTimeout(int) - Adds a TimeUnit argument to the matched method invocations
org.apache.hc.core5.reactor.IOReactorConfig.Builder setSoLinger(int) - Remove method invocations
org.apache.hc.core5.reactor.IOReactorConfig.Builder setConnectTimeout(int) - Change type
ConnectingIOReactortoConnectionInitiator - Change type
org.apache.http.impl.nio.reactor.DefaultConnectingIOReactortoorg.apache.hc.core5.reactor.DefaultConnectingIOReactor - Migrate
HttpAsyncMethodsfactory calls to HttpClient 5.x - Inline hoisted locals used by
new BasicAsyncRequestProducer(...) - Migrate
BasicAsyncRequestProducertoAsyncRequestBuilder - Change type
NStringEntitytoStringEntity - Change type
NByteArrayEntitytoByteArrayEntity - Change type
NFileEntitytoFileEntity