Adds a TimeUnit argument to the matched method invocations
MSALIn Apache Http Client 5.x migration, an extra TimeUnit argument is required in the timeout and duration methods. Previously in 4.x, all these methods were implicitly having the timeout or duration expressed in milliseconds, but in 5.x the unit of the timeout or duration is required. So, by default this recipe adds TimeUnit.MILLISECONDS, it is possible to specify this as a parameter. Since all affected methods of the Apache Http Client 5.x migration only have one integer/long argument, the recipe applies with matched method invocations of exactly one parameter.
org. openrewrite. apache. httpclient5. AddTimeUnitArgumentRequired
A method pattern that is used to find matching method invocations.
Optional
The TimeUnit enum value we want to add to the method invocation. Defaults to MILLISECONDS.
mod run . --recipe= org. openrewrite. apache. httpclient5. AddTimeUnitArgument \
-P methodPattern= 'org. apache. http. client. config. RequestConfig. Builder setConnectionRequestTimeout(int)'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.