Use getFirst() instead of stream().findFirst().orElseThrow()

MSAL

For SequencedCollections, use collection.getFirst() instead of collection.stream().findFirst().orElseThrow().

org.openrewrite.java.migrate.util.StreamFindFirst
mod run . --recipe=org.openrewrite.java.migrate.util.StreamFindFirst

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