Replace iterator().next() with getFirst()
MSALReplace SequencedCollection.iterator().next() with getFirst().
org. openrewrite. java. migrate. util. IteratorNextmod run . --recipe= org. openrewrite. java. migrate. util. IteratorNextInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.