Convert new URL(String) to URI.create(String).toURL()
MSALConverts new URL(String) constructor to URI.create(String).toURL(). The URL constructor has been deprecated due to security vulnerabilities when handling malformed URLs. Using URI.create(String) provides stronger validation and safer URL handling in modern Java applications.
org. openrewrite. java. migrate. net. URLConstructorToURICreatemod run . --recipe= org. openrewrite. java. migrate. net. URLConstructorToURICreateInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.