Use javax.xml.stream.XMLInputFactory#newFactory(String, ClassLoader)

MSAL

Use javax.xml.stream.XMLInputFactory#newFactory instead of the deprecated javax.xml.stream.XMLInputFactory#newInstance in Java 7 or higher.

org.openrewrite.java.migrate.javax.MigrateXMLInputFactoryNewInstanceToNewFactory
mod run . --recipe=org.openrewrite.java.migrate.javax.MigrateXMLInputFactoryNewInstanceToNewFactory

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. Change method name javax.xml.stream.XMLInputFactory newInstance(String, java.lang.ClassLoader) to newFactory