Replace new UrlEncodedFormEntity(List, String) with new UrlEncodedFormEntity(Iterable, Charset)

MSAL

HttpClient 5's UrlEncodedFormEntity takes the charset as a Charset only. Replace a supported charset name literal with the StandardCharsets constant, or with Charset.forName(..), and a static final String constant declared in the same file with Charset.forName(CONSTANT). Other arguments, which may be null, are left for manual migration.

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

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