Move HttpClientBuilder pool settings to a PoolingHttpClientConnectionManager

MSAL

HttpClient 4's HttpClientBuilder applies setMaxConnTotal, setMaxConnPerRoute, setDefaultSocketConfig and setDnsResolver to the connection manager it creates when none is set. HttpClient 5's HttpClientBuilder no longer has these methods; set them on a PoolingHttpClientConnectionManagerBuilder passed to setConnectionManager instead. This covers fluent chains from HttpClientBuilder.create() or HttpClients.custom() to build(), and separate statements on a local builder that is created in the same block and not passed, returned or reassigned. Builders that also set a connection manager, TLS settings, a connection config, a time to live or use system properties are left unchanged.

org.openrewrite.apache.httpclient5.MovePoolSettingsToConnectionManager
mod run . --recipe=org.openrewrite.apache.httpclient5.MovePoolSettingsToConnectionManager

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.