Replace HttpClient.execute(..) returning HttpResponse with executeOpen(..)

MSAL

HttpClient 4's HttpClient.execute(HttpUriRequest), execute(HttpUriRequest, HttpContext) and execute(HttpHost, HttpRequest, HttpContext) returned a response with an entity. In 5.x these methods of the HttpClient interface return an HttpResponse, which has no entity, so the migrated code that reads the response as a ClassicHttpResponse does not compile. executeOpen(HttpHost, ClassicHttpRequest, HttpContext) returns the ClassicHttpResponse and, like 4.x's execute, leaves it open for the caller to consume; a null target is determined from the request, as execute does.

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

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