Adds TimeUnit to timeouts and duration methods

MSAL

Apache HttpClient 5.x Timeout and duration methods need an extra the TimeUnit argument. This recipe uses milliseconds as a default unit.

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

Install 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.

  1. Adds a TimeUnit argument to the matched method invocations org.apache.hc.client5.http.config.RequestConfig.Builder setConnectionRequestTimeout(int)
  2. Adds a TimeUnit argument to the matched method invocations org.apache.hc.client5.http.config.RequestConfig.Builder setConnectTimeout(int)
  3. Adds a TimeUnit argument to the matched method invocations org.apache.hc.client5.http.config.RequestConfig.Builder setResponseTimeout(int)
  4. Adds a TimeUnit argument to the matched method invocations org.apache.hc.core5.http.io.SocketConfig.Builder setSoLinger(int)
  5. Adds a TimeUnit argument to the matched method invocations org.apache.hc.core5.http.io.SocketConfig.Builder setSoTimeout(int)