Use Reader.of(CharSequence) for non-synchronized readers
MSALMigrate new StringReader(String) to Reader.of(CharSequence) in Java 25+. This only applies when assigning to Reader variables or returning from methods that return Reader. The new method creates non-synchronized readers which are more efficient when thread-safety is not required.
org. openrewrite. java. migrate. util. MigrateStringReaderToReaderOfmod run . --recipe= org. openrewrite. java. migrate. util. MigrateStringReaderToReaderOfInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.